19 declare(strict_types=1);
51 $this->tree = $DIC->repositoryTree();
52 $this->
lng = $DIC->language();
53 $this->
ctrl = $DIC[
'ilCtrl'];
63 public function getPath(
int $a_startnode,
int $a_endnode): string
65 $this->startnode = $a_startnode;
66 $this->endnode = $a_endnode;
91 $this->hide_leaf = $a_status;
101 $this->useImages = $a_status;
118 $this->display_cut = $a_status;
135 $tpl =
new ilTemplate(
'tpl.locator_text_only.html',
true,
true,
"Services/Locator");
141 $tpl->setCurrentBlock(
'locator_item');
142 $tpl->setVariable(
'ITEM',
"...");
143 $tpl->parseCurrentBlock();
154 $title = $this->
lng->txt(
'repository');
157 $tpl->touchBlock(
'locator_separator_prefix');
160 $tpl->setCurrentBlock(
'locator_item');
161 $tpl->setVariable(
'ITEM', $title);
162 $tpl->parseCurrentBlock();
169 $tpl =
new ilTemplate(
'tpl.locator.html',
true,
true,
'Services/Locator');
175 $tpl->setCurrentBlock(
'locator_item');
176 $tpl->setVariable(
'ITEM',
"...");
177 $tpl->parseCurrentBlock();
189 $title = $this->
lng->txt(
'repository');
192 $tpl->touchBlock(
'locator_separator_prefix');
195 $tpl->setCurrentBlock(
'locator_img');
197 $tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'obj_' . $type));
198 $tpl->parseCurrentBlock();
201 if (!$this->tree->isDeleted($ref_id)) {
202 $tpl->setCurrentBlock(
'locator_item');
203 $tpl->setVariable(
'LINK_ITEM', $this->
buildLink($ref_id, $type));
204 $tpl->setVariable(
'ITEM', $title);
205 $tpl->parseCurrentBlock();
207 $tpl->setCurrentBlock(
'locator_item');
208 $tpl->setVariable(
'ITEM_READ_ONLY', $title);
209 $tpl->parseCurrentBlock();
214 $tpl->setVariable(
"TXT_BREADCRUMBS", $this->
lng->txt(
"breadcrumb_navigation"));
223 return $this->
lng->txt(
'obj_' . $type);
231 $current_parameters = $this->
ctrl->getParameterArrayByClass(ilAdministrationGUI::class);
232 $this->
ctrl->setParameterByClass(ilAdministrationGUI::class,
'ref_id', $ref_id);
233 $link = $this->
ctrl->getLinkTargetByClass(ilAdministrationGUI::class,
'jump');
234 $this->
ctrl->clearParameterByClass(ilAdministrationGUI::class,
'ref_id');
235 if (isset($current_parameters[
'ref_id'])) {
236 $this->
ctrl->setParameterByClass(ilAdministrationGUI::class,
'ref_id', $current_parameters[
'ref_id']);
240 return ilLink::_getLink($ref_id, $type);
248 $path = $this->tree->getPathId($this->endnode, $this->startnode);
Creates a path for a start and endnode.
getUseImages()
get use images
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
enableTextOnly(bool $a_status)
render path as text only
displayCut()
Display a cut with "...".
setUseImages(bool $a_status)
enableDisplayCut(bool $a_status)
Display a cut with "...".
static _lookupObjId(int $ref_id)
parses the objects.xml it handles the xml-description of all ilias objects
ilObjectDefinition $objectDefinition
static _lookupTitle(int $obj_id)
enableHideLeaf(bool $a_status)
Hide leaf node in path.
buildLink(int $ref_id, string $type)
getPath(int $a_startnode, int $a_endnode)
get path
__construct()
Constructor.
buildTitle(int $a_obj_id)
static _lookupType(int $id, bool $reference=false)