ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\UI\Component\Table\Presentation Interface Reference

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...
 

Detailed Description

This describes a Presentation Table.

Definition at line 31 of file Presentation.php.

Member Function Documentation

◆ getData()

ILIAS\UI\Component\Table\Presentation::getData ( )

Get the recordset of this table.

All elements in $records MUST be processable by the mapping-closure.

Returns
array<mixed>

Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.

◆ getEnvironment()

ILIAS\UI\Component\Table\Presentation::getEnvironment ( )

Get an array of additionally needed elements to build a data-entry.

Returns
array<string,mixed>

Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.

◆ getRowMapping()

ILIAS\UI\Component\Table\Presentation::getRowMapping ( )

Get the closure to construct row-entries with.

Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.

◆ withData()

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.

Parameters
array<mixed>$records

Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.

◆ withEnvironment()

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.

Parameters
array<string,mixed>$environment

Implemented in ILIAS\UI\Implementation\Component\Table\Presentation.

◆ withRowMapping()

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.


The documentation for this interface was generated from the following file: