ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLTIProviderReleasedObjectsTableGUI Class Reference

Description of class ilLTIProviderReleasedObjectsTableGUI. More...

+ Inheritance diagram for ilLTIProviderReleasedObjectsTableGUI:
+ Collaboration diagram for ilLTIProviderReleasedObjectsTableGUI:

Public Member Functions

 __construct (string $a_id='')
 
 getColumns ()
 
 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...
 
 getHtml ()
 
 getId ()
 
- 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
 
ILIAS Data Factory $data_factory
 
ilCtrlInterface $ctrl
 
WrapperFactory $wrapper
 
ILIAS Refinery Factory $refinery
 

Private Member Functions

 getRecords ()
 

Private Attributes

ServerRequestInterface RequestInterface $request
 
array $records
 
string $id
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLTIProviderReleasedObjectsTableGUI::__construct ( string  $a_id = '')

Definition at line 52 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

53 {
54 global $DIC;
55
56 $this->lng = $DIC->language();
57 $this->ui_factory = $DIC->ui()->factory();
58 $this->ui_renderer = $DIC->ui()->renderer();
59 $this->request = $DIC->http()->request();
60 $this->data_factory = new \ILIAS\Data\Factory();
61 $this->ctrl = $DIC->ctrl();
62 $this->wrapper = $DIC->http()->wrapper();
63 $this->refinery = $DIC->refinery();
64 $this->id = $a_id ?: 'lti_released_objects';
65
66 $this->records = $this->getRecords();
67 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getColumns()

ilLTIProviderReleasedObjectsTableGUI::getColumns ( )

Definition at line 69 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

69 : array
70 {
71 return [
72 'type' => $this->ui_factory->table()->column()->statusIcon($this->lng->txt('type')),
73 'title' => $this->ui_factory->table()->column()->link($this->lng->txt('title')),
74 'consumer' => $this->ui_factory->table()->column()->text($this->lng->txt('lti_consumer'))
75 ];
76 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getHtml()

ilLTIProviderReleasedObjectsTableGUI::getHtml ( )

Definition at line 137 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

137 : string
138 {
139 $table = $this->ui_factory->table()
140 ->data($this->lng->txt('lti_released_objects'), $this->getColumns(), $this)
141 ->withOrder(new Order('title', Order::ASC))
142 ->withRequest($this->request);
143
144 return $this->ui_renderer->render($table);
145 }
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:

◆ getId()

ilLTIProviderReleasedObjectsTableGUI::getId ( )

Definition at line 147 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

References $id.

◆ getRecords()

ilLTIProviderReleasedObjectsTableGUI::getRecords ( )
private

Definition at line 78 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

78 : array
79 {
81
82 $result = array();
83 foreach ($rows as $row) {
84 $ref_id = (int) $row['ref_id'];
85
87 if ($type == 'rolf') {
88 continue;
89 }
90
91 $result[] = array(
92 'id' => $ref_id,
93 'ref_id' => $ref_id,
95 'type' => $type,
97 'consumer' => $row['title']
98 );
99 }
100
101 return $result;
102 }
static readReleaseObjects()
Read released objects.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
$ref_id
Definition: ltiauth.php:66

References $ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\Repository\int(), and ilObjLTIAdministration\readReleaseObjects().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTotalRowCount()

ilLTIProviderReleasedObjectsTableGUI::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 130 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

130 : ?int
131 {
132 return count($this->records);
133 }

Field Documentation

◆ $ctrl

ilCtrlInterface ilLTIProviderReleasedObjectsTableGUI::$ctrl
protected

◆ $data_factory

ILIAS Data Factory ilLTIProviderReleasedObjectsTableGUI::$data_factory
protected

◆ $id

string ilLTIProviderReleasedObjectsTableGUI::$id
private

Definition at line 50 of file class.ilLTIProviderReleasedObjectsTableGUI.php.

Referenced by getId().

◆ $lng

ilLanguage ilLTIProviderReleasedObjectsTableGUI::$lng
protected

◆ $records

array ilLTIProviderReleasedObjectsTableGUI::$records
private

◆ $refinery

ILIAS Refinery Factory ilLTIProviderReleasedObjectsTableGUI::$refinery
protected

◆ $request

ServerRequestInterface RequestInterface ilLTIProviderReleasedObjectsTableGUI::$request
private

◆ $ui_factory

Factory ilLTIProviderReleasedObjectsTableGUI::$ui_factory
protected

◆ $ui_renderer

ILIAS UI Renderer ilLTIProviderReleasedObjectsTableGUI::$ui_renderer
protected

◆ $wrapper

WrapperFactory ilLTIProviderReleasedObjectsTableGUI::$wrapper
protected

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