$widgetBuilder
$widgetBuilder : object
Store a widget builder instance.
Provides an implementation of {@see \Charcoal\Ui\Dashboard\DashboardInterface}.
$widgets : array<mixed,\Charcoal\Ui\UiItemInterface>
A colletion of widgets.
setWidgetCallback(callable|null $callable) : \Charcoal\Ui\Dashboard\DashboardInterface
Set a callback to be applied to each widget output by {@see self::widgets()}.
callable|null | $callable | A callback to be applied to each widget or NULL to disable the callback. |
If the argument is not callable or NULL.
Chainable
setWidgets(array $widgets) : \Charcoal\Ui\Dashboard\DashboardInterface
Set the dashboard's widgets.
array | $widgets | A collection of widgets. |
Chainable
addWidget(string $widgetIdent, \Charcoal\Ui\UiItemInterface|array $widget) : \Charcoal\Ui\Dashboard\DashboardInterface
Add a widget to the dashboard.
If a widget with the same $widgetIdent already exists, it will be overridden.
string | $widgetIdent | The widget identifier. |
\Charcoal\Ui\UiItemInterface|array | $widget | The widget object or structure. |
If the widget is invalid.
Chainable
widgets(callable $widgetCallback = null) : array<mixed,\Charcoal\Ui\UiItemInterface>|\Charcoal\Ui\Dashboard\Generator
Retrieve the dashboard's widgets.
callable | $widgetCallback | A callback applied to each widget. |
setWidgetBuilder(object $builder) : \Charcoal\Ui\Dashboard\DashboardInterface
Set a widget builder.
object | $builder | The builder to create customized widget objects. |
If the argument is not a widget builder.
Chainable