ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLTIConsumerProviderUsageTableGUI Class Reference
+ Inheritance diagram for ilLTIConsumerProviderUsageTableGUI:
+ Collaboration diagram for ilLTIConsumerProviderUsageTableGUI:

Public Member Functions

 __construct ()
 
 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...
 
 setData (array $data)
 
 getHTML ()
 
- Public Member Functions inherited from ILIAS\UI\Component\Table\DataRetrieval
 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...
 

Protected Attributes

ilLanguage $lng
 
Factory $ui_factory
 
ILIAS UI Renderer $ui_renderer
 
 $request
 
array $records
 

Private Member Functions

 getColumns ()
 

Detailed Description

Definition at line 38 of file class.ilLTIConsumerProviderUsageTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumerProviderUsageTableGUI::__construct ( )

Definition at line 46 of file class.ilLTIConsumerProviderUsageTableGUI.php.

47 {
48 global $DIC;
49
50 $this->lng = $DIC->language();
51 $this->ui_factory = $DIC->ui()->factory();
52 $this->ui_renderer = $DIC->ui()->renderer();
53 $this->request = $DIC->http()->request();
54 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getColumns()

ilLTIConsumerProviderUsageTableGUI::getColumns ( )
private

Definition at line 101 of file class.ilLTIConsumerProviderUsageTableGUI.php.

101 : array
102 {
103 return [
104 "icon" => $this->ui_factory->table()->column()->statusIcon($this->lng->txt('tbl_lti_prov_icon')),
105 "title" => $this->ui_factory->table()->column()->text($this->lng->txt('tbl_lti_prov_title')),
106 "usedByIsTrashed" => $this->ui_factory->table()->column()->boolean(
107 $this->lng->txt('tbl_lti_prov_usages_trashed'),
108 $this->ui_factory->symbol()->icon()->custom('assets/images/standard/icon_ok.svg', $this->lng->txt('icon_ok'), Icon::SMALL),
109 $this->ui_factory->symbol()->icon()->custom('assets/images/standard/icon_not_ok.svg', $this->lng->txt('icon_not_ok'), Icon::SMALL)
110 ),
111 "used_by" => $this->ui_factory->table()->column()->link($this->lng->txt('tbl_lti_prov_used_by'))
112 ];
113 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getHTML()

ilLTIConsumerProviderUsageTableGUI::getHTML ( )

Definition at line 91 of file class.ilLTIConsumerProviderUsageTableGUI.php.

91 : string
92 {
93 $table = $this->ui_factory->table()
94 ->data($this->lng->txt('tbl_provider_usage_header'), $this->getColumns(), $this)
95 ->withOrder(new Order('title', Order::ASC))
96 ->withRequest($this->request);
97
98 return $this->ui_renderer->render($table);
99 }
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getTotalRowCount()

ilLTIConsumerProviderUsageTableGUI::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 81 of file class.ilLTIConsumerProviderUsageTableGUI.php.

81 : ?int
82 {
83 return count($this->records);
84 }

◆ setData()

ilLTIConsumerProviderUsageTableGUI::setData ( array  $data)

Definition at line 86 of file class.ilLTIConsumerProviderUsageTableGUI.php.

86 : void
87 {
88 $this->records = $data;
89 }

References $data.

Field Documentation

◆ $lng

ilLanguage ilLTIConsumerProviderUsageTableGUI::$lng
protected

Definition at line 40 of file class.ilLTIConsumerProviderUsageTableGUI.php.

◆ $records

array ilLTIConsumerProviderUsageTableGUI::$records
protected

Definition at line 44 of file class.ilLTIConsumerProviderUsageTableGUI.php.

◆ $request

ilLTIConsumerProviderUsageTableGUI::$request
protected

Definition at line 43 of file class.ilLTIConsumerProviderUsageTableGUI.php.

◆ $ui_factory

Factory ilLTIConsumerProviderUsageTableGUI::$ui_factory
protected

Definition at line 41 of file class.ilLTIConsumerProviderUsageTableGUI.php.

◆ $ui_renderer

ILIAS UI Renderer ilLTIConsumerProviderUsageTableGUI::$ui_renderer
protected

Definition at line 42 of file class.ilLTIConsumerProviderUsageTableGUI.php.


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