5include_once
"./Modules/Group/classes/class.ilObjGroupListGUI.php";
73 public function init(): void
75 $this->copy_enabled =
true;
76 $this->static_link_enabled =
false;
77 $this->delete_enabled =
true;
78 $this->cut_enabled =
true;
79 $this->subscribe_enabled =
true;
80 $this->link_enabled =
false;
81 $this->info_screen_enabled =
true;
83 $this->gui_class_name =
"ilobjgroupgui";
86 if ($this->substitutions->isActive()) {
87 $this->substitutions_enabled =
true;
105 $ilAccess =
$DIC[
'ilAccess'];
108 $this->reference_ref_id =
$ref_id;
109 $this->reference_obj_id =
$obj_id;
112 include_once(
'./Services/ContainerReference/classes/class.ilContainerReference.php');
116 $target_ref_id = current($target_ref_ids);
120 $this->deleted = !$target_ref_id ||
$tree->
isDeleted($target_ref_id);
125 parent::initItem((
int) $target_ref_id, $target_obj_id,
$type, $target_title, $target_description);
128 include_once(
'./Modules/GroupReference/classes/class.ilObjGroupReferenceAccess.php');
131 if ($ilAccess->checkAccess(
'write',
'', $this->reference_ref_id) or $this->deleted) {
132 $this->info_screen_enabled =
false;
134 $this->info_screen_enabled =
true;
144 $tree =
$DIC[
'tree'];
146 $props = parent::getProperties();
149 if ($this->deleted) {
150 $props[] = array(
"alert" =>
true,
"property" =>
$lng->txt(
"status"),
151 "value" =>
$lng->txt(
"reference_deleted"));
154 return $props ? $props : array();
171 case 'editReference':
172 return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(),
$type, $obj_id);
175 switch ($permission) {
179 return parent::checkCommandAccess($permission, $cmd, $this->getCommandId(),
$type, $obj_id);
183 return parent::checkCommandAccess($permission, $cmd,
$ref_id,
$type, $obj_id);
196 $ilCtrl =
$DIC[
'ilCtrl'];
199 case 'editReference':
200 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->getCommandId());
201 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $cmd);
202 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
206 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->ref_id);
207 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $cmd);
208 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
static _getInstanceByObjectType(string $a_type)
static _checkAllConditionsOfTarget(int $a_target_ref_id, int $a_target_id, string $a_target_type="", int $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
static _lookupTitle(int $obj_id)
static _lookupTargetId(int $a_obj_id)
getTypeIcon()
Get object type specific type icon.
getProperties()
@inheritDoc
initItem(int $ref_id, int $obj_id, string $type, string $title="", string $description="")
initialize new item (is called by getItemHTML())
insertTimingsCommand()
no activation for links
__construct()
Constructor.
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getCommandLink(string $cmd)
get command link
getCommandId()
get command id
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