AbstractWidget
Abstract Widget.
abstract class
AbstractWidget
Properties summary
Type | Property | Description | |
---|---|---|---|
protected | $title | ||
protected | $description | ||
protected | $columns | ||
protected | $weight | ||
protected | $wrapper | ||
protected | $cache | ||
protected | $cachePerUser | ||
protected | $cacheExpiry | ||
protected | $requiredPermission | ||
protected | $draggable | ||
protected | $adminUser |
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
string | getId() | Get widget id. | |
string | getTitle() | Get title. | |
string | getDescription() | Get description. | |
int | getColumnSize() | Get column size. | |
int | getWeight() | Get display sort weighting. | |
bool | showWrapper() | Get if panel wrapper should be shown. | |
bool | isCachable() | Get if widget allows caching. | |
bool | isCachedPerUser() | Get if widget requires caching per user. | |
int | getCacheExpiry() | Get cache expiry time. | |
string | getRequiredPermission() | Get required permission. | |
array | getData() | Get data method. | |
string | generateOutput(array $data) | Generate output. | |
array | fetchData(bool $forceRefresh = false) | Fetch data. | |
mixed | sanitizeData($data) | - | |
string | render(bool $forceRefresh = false) | Render widget. | |
bool | isDraggable() | - |
Details
string
getId ()
Get widget id.
Returns the class name.
string
getTitle ()
Get title.
string
getDescription ()
Get description.
int
getColumnSize ()
Get column size.
int
getWeight ()
Get display sort weighting.
bool
showWrapper ()
Get if panel wrapper should be shown.
bool
isCachable ()
Get if widget allows caching.
bool
isCachedPerUser ()
Get if widget requires caching per user.
int
getCacheExpiry ()
Get cache expiry time.
string
getRequiredPermission ()
Get required permission.
abstract array
getData ()
Get data method.
A widget should override this method.
abstract string
generateOutput (array $data)
Generate output.
A widget should override this method.
protected array
fetchData (bool $forceRefresh = false)
Fetch data.
mixed
sanitizeData ($data)
string
render (bool $forceRefresh = false)
Render widget.