|
| serialize (int $order) |
|
| __construct (string $id, string $name, $callback, string $desc='') |
|
| id () |
|
| name () |
|
| desc () |
|
| getCallback () |
|
| call ($i=0) |
|
| renderDiv (bool $content_only, string $class, string $attr, string $content) |
|
| renderTitle (?string $title) |
|
| renderSubtitle (?string $title, $render=true) |
|
| __get (string $n) |
|
| __set (string $n, $v) |
|
| setting (string $name, string $title, $value, string $type='text') |
|
| settings () |
|
| formSettings (string $pr='', int &$i=0) |
|
| formSetting (string $id, array $s, string $pr='', int &$i=0) |
|
| addTitle (string $title='') |
|
| addHomeOnly () |
|
| checkHomeOnly ($type, $alt_not_home=1, $alt_home=0) |
|
| addContentOnly (int $content_only=0) |
|
| addClass (string $class='') |
|
| addOffline (int $offline=0) |
|
| isOffline () |
|
◆ __construct()
__construct |
( |
string |
$id, |
|
|
string |
$name, |
|
|
|
$callback, |
|
|
string |
$desc = '' |
|
) |
| |
Constructs a new instance.
- Parameters
-
string | $id | The identifier |
string | $name | The name |
mixed | $callback | The callback |
string | $desc | The description |
References desc(), and name().
◆ serialize()
Get array of widget settings
- Parameters
-
- Returns
- array
References settings().
◆ id()
Get widget ID
- Returns
- string
◆ name()
◆ desc()
Get widget description
- Returns
- string
Referenced by __construct().
◆ getCallback()
Gets the widget callback.
- Returns
- null|callable The callback.
◆ call()
Call a widget callback
- Parameters
-
- Returns
- string
◆ renderDiv()
renderDiv |
( |
bool |
$content_only, |
|
|
string |
$class, |
|
|
string |
$attr, |
|
|
string |
$content |
|
) |
| |
Widget rendering tool
- Parameters
-
bool | $content_only | The content only |
string | $class | The class |
string | $attr | The attribute |
string | $content | The content |
- Returns
- string
References dcCore\app(), and html\escapeHTML().
Referenced by defaultWidgets\bestof(), defaultWidgets\categories(), defaultWidgets\feed(), defaultWidgets\langs(), defaultWidgets\lastcomments(), defaultWidgets\lastposts(), linksWidget(), defaultWidgets\navigation(), tplPages\pagesWidget(), defaultWidgets\search(), defaultWidgets\subscribe(), and defaultWidgets\text().
◆ renderTitle()
renderTitle |
( |
?string |
$title | ) |
|
Render widget title
- Parameters
-
null | string | $title | The title |
- Returns
- string
References dcCore\app(), and DC_DEFAULT_TPLSET.
Referenced by defaultWidgets\bestof(), defaultWidgets\categories(), defaultWidgets\feed(), defaultWidgets\langs(), defaultWidgets\lastcomments(), defaultWidgets\lastposts(), linksWidget(), defaultWidgets\navigation(), tplPages\pagesWidget(), defaultWidgets\search(), defaultWidgets\subscribe(), and defaultWidgets\text().
◆ renderSubtitle()
renderSubtitle |
( |
?string |
$title, |
|
|
|
$render = true |
|
) |
| |
◆ __get()
Gets the specified setting value.
- Parameters
-
- Returns
- mixed
References settings().
◆ __set()
Set the specified setting value
- Parameters
-
string | $n | The setting name |
mixed | $v | The new value |
References settings().
◆ setting()
setting |
( |
string |
$name, |
|
|
string |
$title, |
|
|
|
$value, |
|
|
string |
$type = 'text' |
|
) |
| |
◆ settings()
◆ formSettings()
formSettings |
( |
string |
$pr = '' , |
|
|
int & |
$i = 0 |
|
) |
| |
Get widget settings form
- Parameters
-
string | $pr | The prefix |
int | $i | The index |
- Returns
- string
References formSetting(), and settings().
◆ formSetting()
formSetting |
( |
string |
$id, |
|
|
array |
$s, |
|
|
string |
$pr = '' , |
|
|
int & |
$i = 0 |
|
) |
| |
◆ addTitle()
addTitle |
( |
string |
$title = '' | ) |
|
Adds a title setting.
- Parameters
-
- Returns
- bool|self
References setting().
◆ addHomeOnly()
Adds a home only setting.
- Returns
- bool|self
References setting().
◆ checkHomeOnly()
checkHomeOnly |
( |
|
$type, |
|
|
|
$alt_not_home = 1 , |
|
|
|
$alt_home = 0 |
|
) |
| |
Check if the widget should be displayed, depending on its homeonly setting
- Parameters
-
string | $type | The type |
int | $alt_not_home | Alternate not home test value |
int | $alt_home | Alternate home test value |
- Returns
- bool
References dcCore\app(), and settings().
Referenced by defaultWidgets\bestof(), defaultWidgets\categories(), defaultWidgets\feed(), defaultWidgets\langs(), defaultWidgets\lastcomments(), defaultWidgets\lastposts(), linksWidget(), defaultWidgets\navigation(), tplPages\pagesWidget(), defaultWidgets\search(), defaultWidgets\subscribe(), and defaultWidgets\text().
◆ addContentOnly()
addContentOnly |
( |
int |
$content_only = 0 | ) |
|
Adds a content only setting.
- Parameters
-
int | $content_only | The content only flag |
- Returns
- self|bool
References setting().
◆ addClass()
addClass |
( |
string |
$class = '' | ) |
|
Adds a class setting.
- Parameters
-
- Returns
- self|bool
References setting().
◆ addOffline()
addOffline |
( |
int |
$offline = 0 | ) |
|
Adds an offline setting.
- Parameters
-
int | $offline | The offline flag |
- Returns
- self|bool
References setting().
◆ isOffline()
Determines if setting is offline.
- Returns
- bool True if offline, False otherwise.
References settings().
◆ ALL_PAGES
◆ HOME_ONLY
◆ EXCEPT_HOME
◆ $append_callback
◆ $settings
The documentation for this class was generated from the following file: