19declare(strict_types=1);
34 $this->obj_def =
$DIC[
'objDefinition'];
35 $this->static_url =
$DIC[
'static_url'];
46 if (
null === $object || !$this->
access->checkAccess(
'visible',
'',
$ref_id)) {
49 $html = $object->getTitle() .
' [' .
$ref_id .
']';
55 if ($this->
access->checkAccess(
'delete',
'',
$ref_id) && $this->obj_def->allowLink($object->getType())) {
56 $this->
ctrl->setParameterByClass(ilRepositoryGUI::class,
'item_ref_id',
$ref_id);
57 $actions[] = $this->
factory->link()->standard(
58 $this->
lng->txt(
'link'),
59 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, ilObjRootFolderGUI::class],
'link')
62 if ($this->
access->checkAccess(
'copy',
'',
$ref_id) && $this->obj_def->allowCopy($object->getType())) {
63 $this->
ctrl->setParameterByClass(ilObjectCopyGUI::class,
'source_id',
$ref_id);
64 $actions[] = $this->
factory->link()->standard(
65 $this->
lng->txt(
'copy'),
66 $this->ctrl->getLinkTargetByClass(ilObjectCopyGUI::class,
'initTargetSelection')
75 $link = (string) $this->static_url->builder()->build($object->getType(),
new ReferenceId(
$ref_id));
76 if ($actions === []) {
77 $html = $this->
renderer->render($this->
factory->link()->standard($html, $link));
80 $this->
factory->dropdown()->standard(
81 array_merge([$this->
factory->link()->standard($this->lng->txt(
'view'), $link)], $actions)
const PROP_DISPLAY_COPY_LINK_ACTION_MENU
const PROP_ILIAS_REFERENCE_LINK
ilDclBaseRecordFieldModel $record_field
getRecordField()
Get Record Field.
getField()
Getter shortcut for field.
ilObjectDefinition $obj_def
__construct(ilDclBaseRecordFieldModel $record_field)
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
parses the objects.xml it handles the xml-description of all ilias objects
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc