ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSysStyleCatAssignmentTableGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  protected string $skin_id;
27  protected string $style_id;
28  protected string $sub_style_id;
29 
30  public function __construct(
31  ilSystemStyleSettingsGUI $a_parent_obj,
32  string $a_parent_cmd,
33  string $skin_id,
34  string $style_id,
35  string $sub_style_id
36  ) {
37  global $DIC;
38 
39  parent::__construct($a_parent_obj, $a_parent_cmd);
40 
41  $this->skin_id = $skin_id;
42  $this->style_id = $style_id;
43  $this->sub_style_id = $sub_style_id;
44 
45  $this->getStyleCatAssignments();
46  $this->setTitle($this->lng->txt('sty_cat_assignments'));
47 
48  $this->addColumn('', '', '1');
49  $this->addColumn($this->lng->txt('obj_cat'));
50 
51  $this->setFormAction($DIC->ctrl()->getFormAction($a_parent_obj));
52  $this->setRowTemplate('tpl.sty_cat_ass_row.html', 'Services/Style/System');
53 
54  $this->addMultiCommand('deleteAssignments', $DIC->language()->txt('remove_assignment'));
55  }
56 
57  public function getStyleCatAssignments(): void
58  {
60  $this->skin_id,
61  $this->style_id,
62  $this->sub_style_id
63  ));
64  }
65 
69  protected function fillRow(array $a_set): void
70  {
71  $this->tpl->setVariable('REF_ID', $a_set['ref_id']);
72  $this->tpl->setVariable(
73  'CATEGORY',
74  ilObject::_lookupTitle(ilObject::_lookupObjId((int)$a_set['ref_id']))
75  );
76  }
77 }
setData(array $a_data)
setFormAction(string $a_form_action, bool $a_multipart=false)
__construct(ilSystemStyleSettingsGUI $a_parent_obj, string $a_parent_cmd, string $skin_id, string $style_id, string $sub_style_id)
static _lookupObjId(int $ref_id)
TableGUI class for system style to category assignments.
global $DIC
Definition: feed.php:28
static _lookupTitle(int $obj_id)
static getSubStyleCategoryAssignments(string $a_skin_id, string $a_style_id, string $a_sub_style_id)
Get all system category assignments of exactly one substyle.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
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)
addMultiCommand(string $a_cmd, string $a_text)