◆ __construct()
◆ getHTML()
ilDclIliasReferenceRecordRepresentation::getHTML |
( |
bool |
$link = true , |
|
|
array |
$options = [] |
|
) |
| |
Definition at line 38 of file class.ilDclIliasReferenceRecordRepresentation.php.
References $ref_id, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), factory(), ilDclBaseRecordRepresentation\getField(), ilObjectFactory\getInstanceByRefId(), ilDclBaseRecordRepresentation\getRecordField(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilDclBaseFieldModel\PROP_DISPLAY_COPY_LINK_ACTION_MENU, ilDclBaseFieldModel\PROP_ILIAS_REFERENCE_LINK, and renderer().
46 $html = $object->getTitle() .
' [' .
$ref_id .
']';
52 if ($this->
access->checkAccess(
'delete',
'',
$ref_id) && $this->obj_def->allowLink($object->getType())) {
53 $this->
ctrl->setParameterByClass(ilRepositoryGUI::class,
'item_ref_id',
$ref_id);
54 $actions[] = $this->
factory->link()->standard(
55 $this->
lng->txt(
'link'),
56 $this->
ctrl->getLinkTargetByClass([ilRepositoryGUI::class, ilObjRootFolderGUI::class],
'link')
59 if ($this->
access->checkAccess(
'copy',
'',
$ref_id) && $this->obj_def->allowCopy($object->getType())) {
60 $this->
ctrl->setParameterByClass(ilObjectCopyGUI::class,
'source_id',
$ref_id);
61 $actions[] = $this->
factory->link()->standard(
62 $this->
lng->txt(
'copy'),
63 $this->
ctrl->getLinkTargetByClass(ilObjectCopyGUI::class,
'initTargetSelection')
72 $link = (string) $this->static_url->builder()->build($object->getType(),
new ReferenceId(
$ref_id));
73 if ($actions === []) {
74 $html = $this->
renderer->render($this->
factory->link()->standard($html, $link));
77 $this->
factory->dropdown()->standard(
78 array_merge([$this->
factory->link()->standard($this->
lng->txt(
'view'), $link)], $actions)
getField()
Getter shortcut for field.
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
const PROP_DISPLAY_COPY_LINK_ACTION_MENU
getRecordField()
Get Record Field.
const PROP_ILIAS_REFERENCE_LINK
◆ $obj_def
◆ $static_url
Services ilDclIliasReferenceRecordRepresentation::$static_url |
|
private |
The documentation for this class was generated from the following file: