setType()
setType(string|null $type) : \Charcoal\Ui\UiItemInterface
Set the UI item type.
Parameters
string|null | $type | The UI item type. |
Returns
\Charcoal\Ui\UiItemInterface —Chainable
Defines a dashboard.
Dashboards are simply a collection of widgets, in a layout.
layout
is a LayoutInterface
object that can be created with a LayoutBuilder
.widgets
is a collection of any UiItemInterface
objects.setType(string|null $type) : \Charcoal\Ui\UiItemInterface
Set the UI item type.
string|null | $type | The UI item type. |
Chainable
setActive(boolean $active) : \Charcoal\Ui\UiItemInterface
Activates/deactivates the UI item.
boolean | $active | Activate (TRUE) or deactivate (FALSE) the UI item. |
Chainable
setTemplate(string $template) : \Charcoal\Ui\UiItemInterface
Set the UI item's template.
Usually, a path to a file containing the template to be rendered.
string | $template | A template (identifier). |
Chainable
setTitle(mixed $title) : \Charcoal\Ui\UiItemInterface
Set the UI item's title.
mixed | $title | A title. |
Chainable
setSubtitle(mixed $subtitle) : \Charcoal\Ui\UiItemInterface
Set the UI item's sub-title.
mixed | $subtitle | A sub-title. |
Chainable
setDescription(mixed $description) : \Charcoal\Ui\UiItemInterface
Set the UI item's description.
mixed | $description | A description. |
Chainable
setNotes(mixed $notes) : \Charcoal\Ui\UiItemInterface
Set notes about the UI item.
mixed | $notes | Notes. |
Chainable
setShowTitle(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's title.
boolean | $show | Show (TRUE) or hide (FALSE) the title. |
Chainable
setShowSubtitle(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's sub-title.
boolean | $show | Show (TRUE) or hide (FALSE) the sub-title. |
Chainable
setShowDescription(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's description.
boolean | $show | Show (TRUE) or hide (FALSE) the description. |
Chainable
setShowNotes(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's notes.
boolean | $show | Show (TRUE) or hide (FALSE) the notes. |
Chainable
setShowHeader(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's header.
boolean | $show | Show (TRUE) or hide (FALSE) the header. |
Chainable
setShowFooter(boolean $show) : \Charcoal\Ui\UiItemInterface
Show/hide the UI item's footer.
boolean | $show | Show (TRUE) or hide (FALSE) the footer. |
Chainable
setLayoutBuilder(\Charcoal\Ui\Layout\LayoutBuilder $builder) : \Charcoal\Ui\Layout\DashboardInterface
\Charcoal\Ui\Layout\LayoutBuilder | $builder | The layout builder, to create customized layout object(s). |
Chainable
setLayout(\Charcoal\Ui\Layout\LayoutInterface|array $layout) : \Charcoal\Ui\Layout\DashboardInterface
\Charcoal\Ui\Layout\LayoutInterface|array | $layout | The layout object or structure. |
Chainable
layout() : \Charcoal\Ui\Layout\LayoutInterface
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.
string | $widgetIdent | The widget identifier. |
\Charcoal\Ui\UiItemInterface|array | $widget | The widget object or structure. |
Chainable
widgets() : array<mixed,\Charcoal\Ui\UiItemInterface>|\Charcoal\Ui\Dashboard\Generator
Retrieve the dashboard's widgets.