Documentation

FileListWidget extends Widget
in package

doc list widget

Table of Contents

Properties

$default_settings  : mixed
Array of default settings for new widgets
$friendly_desc  : mixed
A description, for display in the admin
$friendly_name  : mixed
The friendly name, for display in the admin
$heading  : mixed
Optional HTML H2 heading that's rendered on front-end view
$settings  : mixed
Settings - These get automatically set in the admin and loaded on the front-end

Methods

cleanupSettings()  : void
Run after import of settings, allows extending widgets to clean up settings which may have bad values for some reason
getDefaultSettings()  : mixed
Returns the default settings for the widget
getEditUrl()  : mixed
Returns a URL for editing the contents of this widget See {@link Widget::getEditUrl} for full documentation
getFriendlyDesc()  : mixed
Gets the english name of this widget
getFriendlyName()  : mixed
Gets the english name of this widget
getInfoLabels()  : mixed
Returns a label which describes the contents of this widget See {@link Widget::get_info_label} for full documentation
getNotAvailableReason()  : mixed
Is there sufficent content to add this addon at the moment? If this widget is not available, a string message should be returned If this widget *is* available, NULL should be returned.
getSettings()  : array<string|int, mixed>
Return the currently loaded settings for the widget
getSettingsForm()  : string
Returns the settings for the doc list widget See {@link Widget::getSettingsForm} for full documentation
getTitle()  : mixed
Returns the title to use for the widget - should not contain HTML
importSettings()  : mixed
Imports the settings
render()  : string
Returns the output of the doc list widget See {@link Widget::render} for full documentation
setTitle()  : void
Set widget title
getOrderSql()  : mixed
Returns the SQL which should be used for ordering the articles

Properties

$default_settings

Array of default settings for new widgets

protected mixed $default_settings = ['order' => \Sprout\Helpers\FileConstants::ORDER_NAME]

$friendly_desc

A description, for display in the admin

protected mixed $friendly_desc = "Displays a list of up to 50 files"

$friendly_name

The friendly name, for display in the admin

protected mixed $friendly_name = "File list"

$heading

Optional HTML H2 heading that's rendered on front-end view

protected mixed $heading = ''

$settings

Settings - These get automatically set in the admin and loaded on the front-end

protected mixed $settings = []

Methods

cleanupSettings()

Run after import of settings, allows extending widgets to clean up settings which may have bad values for some reason

public cleanupSettings() : void

getDefaultSettings()

Returns the default settings for the widget

public final getDefaultSettings() : mixed

getEditUrl()

Returns a URL for editing the contents of this widget See {@link Widget::getEditUrl} for full documentation

public getEditUrl() : mixed

getFriendlyDesc()

Gets the english name of this widget

public getFriendlyDesc() : mixed

getFriendlyName()

Gets the english name of this widget

public getFriendlyName() : mixed

getInfoLabels()

Returns a label which describes the contents of this widget See {@link Widget::get_info_label} for full documentation

public getInfoLabels() : mixed

getNotAvailableReason()

Is there sufficent content to add this addon at the moment? If this widget is not available, a string message should be returned If this widget *is* available, NULL should be returned.

public getNotAvailableReason() : mixed

getSettings()

Return the currently loaded settings for the widget

public getSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The widget settings

getSettingsForm()

Returns the settings for the doc list widget See {@link Widget::getSettingsForm} for full documentation

public getSettingsForm() : string
Return values
string —

The output HTML.

getTitle()

Returns the title to use for the widget - should not contain HTML

public getTitle() : mixed

importSettings()

Imports the settings

public importSettings(array<string|int, mixed> $settings) : mixed
Parameters
$settings : array<string|int, mixed>

The widget settings

render()

Returns the output of the doc list widget See {@link Widget::render} for full documentation

public render(int $orientation) : string
Parameters
$orientation : int

The orientation of the widget.

Return values
string —

The output HTML.

setTitle()

Set widget title

public setTitle(string $str) : void
Parameters
$str : string

Widget title (heading)

getOrderSql()

Returns the SQL which should be used for ordering the articles

private getOrderSql() : mixed
On this page

Search results