ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilLTIConsumerProviderUsageTableGUI Class Reference
+ Inheritance diagram for ilLTIConsumerProviderUsageTableGUI:
+ Collaboration diagram for ilLTIConsumerProviderUsageTableGUI:

Public Member Functions

 __construct ()
 
 getTotalRowCount (mixed $additional_viewcontrol_data, mixed $filter_data, mixed $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, mixed $additional_viewcontrol_data, mixed $filter_data, mixed $additional_parameters)
 This is called by the table to retrieve rows; map data-records to rows using the $row_builder e.g. More...
 
 getTotalRowCount (mixed $additional_viewcontrol_data, mixed $filter_data, mixed $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 111 of file class.ilLTIConsumerProviderUsageTableGUI.php.

111 : array
112 {
113 return [
114 "icon" => $this->ui_factory->table()->column()->statusIcon($this->lng->txt('tbl_lti_prov_icon')),
115 "title" => $this->ui_factory->table()->column()->text($this->lng->txt('tbl_lti_prov_title')),
116 "usedByIsTrashed" => $this->ui_factory->table()->column()->boolean(
117 $this->lng->txt('tbl_lti_prov_usages_trashed'),
118 $this->ui_factory->symbol()->icon()->custom('assets/images/standard/icon_ok.svg', $this->lng->txt('icon_ok'), Icon::SMALL),
119 $this->ui_factory->symbol()->icon()->custom('assets/images/standard/icon_not_ok.svg', $this->lng->txt('icon_not_ok'), Icon::SMALL)
120 ),
121 "used_by" => $this->ui_factory->table()->column()->link($this->lng->txt('tbl_lti_prov_used_by'))
122 ];
123 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getHTML()

ilLTIConsumerProviderUsageTableGUI::getHTML ( )

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

101 : string
102 {
103 $table = $this->ui_factory->table()
104 ->data($this->lng->txt('tbl_provider_usage_header'), $this->getColumns(), $this)
105 ->withOrder(new Order('title', Order::ASC))
106 ->withRequest($this->request);
107
108 return $this->ui_renderer->render($table);
109 }
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 ( mixed  $additional_viewcontrol_data,
mixed  $filter_data,
mixed  $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 88 of file class.ilLTIConsumerProviderUsageTableGUI.php.

92 : ?int {
93 return count($this->records);
94 }

◆ setData()

ilLTIConsumerProviderUsageTableGUI::setData ( array  $data)

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

96 : void
97 {
98 $this->records = $data;
99 }

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: