ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
class.ilLTIProviderReleasedObjectsTableGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
28{
29 //only because type in ilObjectTableGUI - could be erased
30 public function __construct(?object $a_parent_obj, string $a_parent_cmd, $a_id)
31 {
32 $this->setId('obj_table_' . $a_id);
33 parent::__construct($a_parent_obj, $a_parent_cmd, "");
34 }
35
39 public function init(): void
40 {
41 if ($this->enabledRowSelectionInput()) {
42 $this->addColumn('', 'id', '5px');
43 }
44
45 $this->addColumn($this->lng->txt('type'), 'type', '30px');
46 $this->addColumn($this->lng->txt('title'), 'title');
47 $this->addColumn($this->lng->txt('lti_consumer'), 'consumer', '30%');
48
49 $this->setOrderColumn('title');
50 $this->setRowTemplate('tpl.lti_object_table_row.html', 'Services/LTI');
51 }
52
57 public function fillRow(array $a_set): void
58 {
59 parent::fillRow($a_set);
60
61 $this->tpl->setVariable('CONSUMER_TITLE', $a_set['consumer']);
62 }
63
64 public function parse(): void
65 {
67
68 $counter = 0;
69 $set = array();
70 foreach ($rows as $row) {
71 $ref_id = (int) $row['ref_id'];
72
73
75 if ($type == 'rolf') {
76 continue;
77 }
78
79 $set[$counter]['ref_id'] = $ref_id;
80 $set[$counter]['obj_id'] = ilObject::_lookupObjId($ref_id);
81 $set[$counter]['type'] = ilObject::_lookupType(ilObject::_lookupObjId($ref_id));
82 $set[$counter]['title'] = ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id));
83 $set[$counter]['consumer'] = $row['title'];
84 $counter++;
85 }
86 $this->setData($set);
87 }
88}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?object $a_parent_obj, string $a_parent_cmd, $a_id)
static readReleaseObjects()
Read released objects.
Settings for LO courses.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setData(array $a_data)
Set table data.
setOrderColumn(string $a_order_column="", string $a_default_column="")
$ref_id
Definition: ltiauth.php:67
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type
$rows
Definition: xhr_table.php:10