ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjOrgUnitListGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 protected ilLanguage $lng;
30
31
32 public function __construct()
33 {
34 global $DIC;
36 $this->lng = $DIC->language();
37 $this->settings = $DIC->settings();
38 }
39
43 public function init(): void
44 {
45 $this->static_link_enabled = true;
46 $this->delete_enabled = true;
47 $this->cut_enabled = true;
48 $this->info_screen_enabled = true;
49 $this->copy_enabled = false;
50 $this->subscribe_enabled = false;
51 $this->link_enabled = false;
52
53 $this->type = "orgu";
54 $this->gui_class_name = "ilobjorgunitgui";
55
56 // general commands array
57 $this->commands = ilObjOrgUnitAccess::_getCommands();
58 }
59
63 public function insertTimingsCommand(): void
64 {
65 }
66
70 public function insertCommonSocialCommands(bool $a_header_actions = false): void
71 {
72 }
73
77 public function insertInfoScreenCommand(): void
78 {
79 if ($this->std_cmd_only) {
80 return;
81 }
82 $cmd_link = $this->ctrl->getLinkTargetByClass([ilObjOrgUnitGUI::class, ilInfoScreenGUI::class], "showSummary");
83 $cmd_frame = $this->getCommandFrame("infoScreen");
84
85 $this->insertCommand(
86 $cmd_link,
87 $this->lng->txt("info_short"),
88 $cmd_frame,
89 ilUtil::getImagePath("standard/icon_info.svg")
90 );
91 }
92
93 public function getCommandLink(string $a_cmd): string
94 {
95 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $this->ref_id);
96
97 return $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", $a_cmd);
98 }
99
103 public function getTypeIcon(): string
104 {
105 $icons_cache = ilObjOrgUnit::getIconsCache();
106 if (isset($icons_cache[$this->obj_id])) {
107 $icon_file = $icons_cache[$this->obj_id];
108 return $icon_file;
109 }
110
111 return ilObject::getIconForReference(
112 $this->ref_id,
113 $this->obj_id,
114 'small',
115 $this->getIconImageType()
116 );
117 }
118}
language handling
static _getCommands()
get commands this method returns an array of all possible commands/permission combinations example: $...
Class ilObjOrgUnitListGUI.
insertCommonSocialCommands(bool $a_header_actions=false)
no social commands needed in orgunits.
insertInfoScreenCommand()
insert info screen command
insertTimingsCommand()
no timing commands needed in orgunits.
getTypeIcon()
Get object type specific type icon.
getCommandLink(string $a_cmd)
Get command link url.
static getIconsCache()
Returns an array that maps from OrgUnit object IDs to its icon defined by the assigned OrgUnit type.
getIconImageType()
Returns the icon image type.
getCommandFrame(string $cmd)
Get command target frame.
insertCommand(string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
insert command button
ILIAS Setting Class.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26