ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
This describes a Presentation Table. More...
Public Member Functions | |
withRowMapping (Closure $row_mapping) | |
Get a table like this with the closure $row_mapping. More... | |
getRowMapping () | |
Get the closure to construct row-entries with. More... | |
withEnvironment (array $environment) | |
Add a list of additional things the mapping-closure needs for processing. More... | |
getEnvironment () | |
Get an array of additionally needed elements to build a data-entry. More... | |
withData (array $records) | |
Fill a recordset into the table. More... | |
getData () | |
Get the recordset of this table. More... | |
![]() | |
withTitle (string $title) | |
getTitle () | |
![]() | |
getCanonicalName () | |
Get the canonical name of the component. More... | |
reduceWith (\Closure $fn) | |
The scheme starts at the leaves of the structure and applies the function to each leave and moves up the tree recursively. More... | |
![]() | |
withViewControls (array $view_controls) | |
Add View Controls. More... | |
getViewControls () | |
Get View Controls. More... | |
![]() | |
withOnLoadCode (Closure $binder) | |
withAdditionalOnLoadCode (Closure $binder) | |
Add some onload-code to the component instead of replacing the existing one. More... | |
getOnLoadCode () | |
Get the currently bound on load code. More... | |
This describes a Presentation Table.
Definition at line 31 of file Presentation.php.
ILIAS\UI\Component\Table\Presentation::getData | ( | ) |
Get the recordset of this table.
All elements in $records MUST be processable by the mapping-closure.
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.
ILIAS\UI\Component\Table\Presentation::getEnvironment | ( | ) |
Get an array of additionally needed elements to build a data-entry.
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.
ILIAS\UI\Component\Table\Presentation::getRowMapping | ( | ) |
Get the closure to construct row-entries with.
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.
ILIAS\UI\Component\Table\Presentation::withData | ( | array | $records | ) |
Fill a recordset into the table.
All elements in $records MUST be processable by the mapping-closure.
array<mixed> | $records |
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.
ILIAS\UI\Component\Table\Presentation::withEnvironment | ( | array | $environment | ) |
Add a list of additional things the mapping-closure needs for processing.
These can be virtually anything.
array<string,mixed> | $environment |
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.
ILIAS\UI\Component\Table\Presentation::withRowMapping | ( | Closure | $row_mapping | ) |
Get a table like this with the closure $row_mapping.
This closure is called by the renderer upon building a row from a record. The renderer will call the closure with these parameters:
$row An instance of Component; fill the mutator according to your needs and the structure of your record. $record An element of the table's data. This is the actually variable part when rendering rows. $ui_factory You might, e.g., want a descriptive listing or and image within the content of the row. Use the UI-Factory to build it. $environment When you need auxiliary classes or functions to properly render the data, this is the place to put it.
In short: The closure MUST accept the following parameter $row mixed $record $ui_factory mixed $environment The closure MUST return
Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.