|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
This describes a Presentation Table. More...
Inheritance diagram for ILIAS\UI\Component\Table\Presentation:
Collaboration diagram for ILIAS\UI\Component\Table\Presentation: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... | |
Public Member Functions inherited from ILIAS\UI\Component\Table\Table | |
| withTitle (string $title) | |
| getTitle () | |
Public Member Functions inherited from ILIAS\UI\Component\Component | |
| 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... | |
Public Member Functions inherited from ILIAS\UI\Component\ViewControl\HasViewControls | |
| withViewControls (array $view_controls) | |
| Add View Controls. More... | |
| getViewControls () | |
| Get View Controls. More... | |
Public Member Functions inherited from ILIAS\UI\Component\JavaScriptBindable | |
| 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.
| ILIAS\UI\Component\Table\Presentation::getEnvironment | ( | ) |
Get an array of additionally needed elements to build a data-entry.
| ILIAS\UI\Component\Table\Presentation::getRowMapping | ( | ) |
Get the closure to construct row-entries with.
| 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 |
| 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 |
| 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\Table\PresentationRow; 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 \PresentationRow $row mixed $record \Factory $ui_factory mixed $environment The closure MUST return \PresentationRow