19declare(strict_types=1);
38 $this->
access = $DIC->access();
39 $this->tree =
$DIC->repositoryTree();
40 $this->
lng = $DIC->language();
41 $this->
user = $DIC->user();
42 $this->
ctrl = $DIC->ctrl();
44 $this->cont_ref_request =
$DIC
45 ->containerReference()
75 public function init(): void
77 $this->copy_enabled =
true;
78 $this->static_link_enabled =
false;
79 $this->delete_enabled =
true;
80 $this->cut_enabled =
true;
81 $this->subscribe_enabled =
true;
82 $this->link_enabled =
false;
83 $this->info_screen_enabled =
true;
85 $this->gui_class_name =
"ilobjcategorygui";
88 if ($this->substitutions->isActive()) {
89 $this->substitutions_enabled =
true;
100 $ilAccess = $this->
access;
103 $this->reference_ref_id =
$ref_id;
104 $this->reference_obj_id =
$obj_id;
109 $target_ref_id = current($target_ref_ids);
113 $this->deleted = !$target_ref_id ||
$tree->
isDeleted($target_ref_id);
115 parent::initItem((
int) $target_ref_id, $target_obj_id,
$type, $target_title, $target_description);
120 if ($this->deleted || $ilAccess->checkAccess(
'write',
'', $this->reference_ref_id)) {
121 $this->info_screen_enabled =
false;
123 $this->info_screen_enabled =
true;
133 $props = parent::getProperties();
136 if ($tree->isDeleted($this->ref_id)) {
138 "alert" =>
true,
"property" =>
$lng->txt(
"status"),
139 "value" =>
$lng->txt(
"reference_deleted")
155 case 'editReference':
156 return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(), $type, $obj_id);
159 switch ($permission) {
163 return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(), $type, $obj_id);
167 return parent::checkCommandAccess($permission, $cmd,
$ref_id, $type, $obj_id);
173 $ilCtrl = $this->ctrl;
176 case 'editReference':
177 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->getCommandId());
178 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $cmd);
179 $ilCtrl->setParameterByClass(
182 $this->cont_ref_request->getRefId()
187 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->ref_id);
188 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $cmd);
189 $ilCtrl->setParameterByClass(
192 $this->cont_ref_request->getRefId()
static _getInstanceByObjectType(string $a_type)
static _lookupTitle(int $obj_id)
static _lookupTargetId(int $a_obj_id)
Class ilObjCategoryListGUI.
getTypeIcon()
Get object type specific type icon.
StandardGUIRequest $cont_ref_request
insertTimingsCommand()
ks, 23 OCT 2023: This function is badly named and it already was before the changes made today.
getIconImageType()
Returns the icon image type.
getCommandId()
get command id Normally the ref id.
initItem(int $ref_id, int $obj_id, string $type, string $title="", string $description="")
initialize new item (is called by getItemHTML())
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getProperties()
Get item properties.
getCommandLink(string $cmd)
Get command link url.
static _getCommands()
get commands
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static _lookupDescription(int $obj_id)
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc