ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\Contact\TableRows Class Reference
+ Inheritance diagram for ILIAS\Contact\TableRows:
+ Collaboration diagram for ILIAS\Contact\TableRows:

Public Member Functions

 __construct (private readonly Closure $rows)
 
 getRows (DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters)
 This is called by the table to retrieve rows; map data-records to rows using the $row_builder e.g. More...
 
 getTotalRowCount (?array $filter_data, ?array $additional_parameters)
 Mainly for the purpose of pagination-support, it is important to know about the total number of records available. More...
 

Detailed Description

Definition at line 31 of file TableRows.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Contact\TableRows::__construct ( private readonly Closure  $rows)
Parameters
Closure(DataRowBuilder,string[],Range,Order,?array,?array)Generator $rows

Definition at line 36 of file TableRows.php.

37  {
38  }

Member Function Documentation

◆ getRows()

ILIAS\Contact\TableRows::getRows ( DataRowBuilder  $row_builder,
array  $visible_column_ids,
Range  $range,
Order  $order,
?array  $filter_data,
?array  $additional_parameters 
)

This is called by the table to retrieve rows; map data-records to rows using the $row_builder e.g.

yield $row_builder->buildStandardRow($row_id, $record).

Parameters
string[]$visible_column_ids

Implements ILIAS\UI\Component\Table\DataRetrieval.

Definition at line 40 of file TableRows.php.

47  : Generator {
48  return ($this->rows)(...func_get_args());
49  }

◆ getTotalRowCount()

ILIAS\Contact\TableRows::getTotalRowCount ( ?array  $filter_data,
?array  $additional_parameters 
)

Mainly for the purpose of pagination-support, it is important to know about the total number of records available.

Given the nature of a DataTable, which is, opposite to a PresentationTable, rather administrative than explorative, this information will increase user experience quite a bit. However, you may return null, if the call is to costly, but expect the View Control to look a little different in this case.

Make sure that potential filters or user restrictions are being applied to the count.

Implements ILIAS\UI\Component\Table\DataRetrieval.

Definition at line 51 of file TableRows.php.

51  : ?int
52  {
53  return current(Pagination::DEFAULT_LIMITS) - 1; // Disable pagination controls.
54  }

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