19 declare(strict_types=1);
39 $this->
ctrl = $DIC[
'ilCtrl'];
40 $this->
lng = $DIC[
'lng'];
41 $this->
access = $DIC[
'ilAccess'];
42 $this->tree = $DIC[
'tree'];
43 $this->obj_definition = $DIC[
'objDefinition'];
44 $this->ui_factory = $DIC[
'ui.factory'];
45 $this->ui_renderer = $DIC[
'ui.renderer'];
48 $this->
setId(
'objownmgmt');
57 $this->
setRowTemplate(
'tpl.obj_ownership_row.html',
'Services/Object');
73 if (!$this->user_id) {
77 foreach ($data as
$id => $item) {
83 if (!$this->tree->isDeleted($ref_id)) {
85 $readable = $this->
access->checkAccessOfUser(
93 $readable = $is_admin;
102 'readable' => $readable
114 $icon = $this->ui_factory->symbol()->icon()->standard($set[
'type'], $set[
'title'], Standard::MEDIUM);
115 $this->tpl->setVariable(
'ICON', $this->ui_renderer->render(
$icon));
118 $this->tpl->setVariable(
'PATH', $set[
'path']);
121 $this->tpl->setCurrentBlock(
'actions');
122 $this->tpl->setVariable(
'ACTIONS', $this->
buildActions($set[
'ref_id'], $set[
'type']));
123 $this->tpl->parseCurrentBlock();
129 $this->
ctrl->setParameter($this->parent_obj,
'ownid', $ref_id);
132 $actions[] = $this->ui_factory->link()->standard(
133 $this->
lng->txt(
'show'),
134 ilLink::_getLink($ref_id, $type)
135 )->withOpenInNewViewport(
true);
137 $actions[] = $this->ui_factory->link()->standard(
138 $this->
lng->txt(
'move'),
139 $this->
ctrl->getLinkTargetByClass(get_class($this->parent_obj),
'move')
142 $actions[] = $this->ui_factory->link()->standard(
143 $this->
lng->txt(
'change_owner'),
144 $this->
ctrl->getLinkTargetByClass(get_class($this->parent_obj),
'changeOwner')
147 if (!in_array($type, [
'crsr',
'catr',
'grpr']) && $this->obj_definition->allowExport($type)) {
148 $actions[] = $this->ui_factory->link()->standard(
149 $this->
lng->txt(
'export'),
150 $this->
ctrl->getLinkTargetByClass(get_class($this->parent_obj),
'export')
154 $actions[] = $this->ui_factory->link()->standard(
155 $this->
lng->txt(
'delete'),
156 $this->
ctrl->getLinkTargetByClass(get_class($this->parent_obj),
'delete')
159 $actions_dropdown = $this->ui_factory->dropdown()->standard($actions)
160 ->withLabel($this->
lng->txt(
'actions'));
162 $this->
ctrl->setParameter($this->parent_obj,
'ownid',
'');
164 return $this->ui_renderer->render($actions_dropdown);
171 $path_full = $this->tree->getPathFull($ref_id);
172 foreach ($path_full as
$data) {
173 if (++$counter < (count($path_full) - 2)) {
176 if ($ref_id != $data[
'ref_id']) {
177 $path .=
' » ' . $data[
'title'];
186 if (!method_exists($this->parent_obj,
'isReadOnly')) {
189 return $this->parent_obj->isReadOnly();
An entity that renders components to a string output.
__construct(?object $parent_obj, string $parent_cmd, int $user_id)
setFormAction(string $a_form_action, bool $a_multipart=false)
static _getAllReferences(int $id)
get all reference ids for object ID
setDisableFilterHiding(bool $a_val=true)
parses the objects.xml it handles the xml-description of all ilias objects
ilObjectDefinition $obj_definition
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
buildActions(int $ref_id, string $type)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
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)
static _lookupType(int $id, bool $reference=false)