43 $this->entries = array();
44 $this->offline =
false;
48 protected function init(): void
52 if ($this->initialised) {
55 $this->tree = $DIC->repositoryTree();
56 $this->
ctrl = $DIC->ctrl();
57 $this->obj_definition = $DIC[
"objDefinition"];
58 $this->
access = $DIC->access();
60 $lng = $DIC->language();
63 $this->ref_id = ($DIC->http()->wrapper()->query()->has(
"ref_id"))
64 ? $DIC->http()->wrapper()->query()->retrieve(
"ref_id", $DIC->refinery()->kindlyTo()->int())
66 if ($this->ref_id == 0) {
73 $this->textonly = $a_textonly;
78 $this->offline = $a_offline;
103 if ($a_ref_id == 0) {
113 foreach (
$path as $k => $v) {
114 if ($v[
"type"] ==
"crs") {
115 $crs_ref_id = $v[
"child"];
118 if (!$setting->get(
"rep_breadcr_crs")) {
120 } elseif ($setting->get(
"rep_breadcr_crs_overwrite")) {
133 if (!in_array($row[
"type"], array(
"root",
"cat",
"crs",
"fold",
"grp",
"prg",
"lso"))) {
136 if ($crs_ref_id > 0 && $row[
"child"] == $crs_ref_id) {
139 if ($crs_ref_id > 0) {
143 if ($row[
"title"] ==
"ILIAS" && $row[
"type"] ==
"root") {
144 $row[
"title"] = $this->
lng->txt(
"repository");
169 if ($a_ref_id == 0) {
178 if (!in_array($row[
"type"], array(
"root",
"cat",
"crs",
"fold",
"grp"))) {
183 $row[
"title"] = $lng->
txt(
"repository");
186 $class_name = $objDefinition->getClassName($row[
"type"]);
187 $class = strtolower(
"ilObj" . $class_name .
"GUI");
188 $ilCtrl->setParameterByClass($class,
"ref_id", $row[
"child"]);
191 $ilCtrl->getLinkTargetByClass($class,
"view"),
201 bool $a_omit_node =
false,
212 $r_path = array_reverse(
$path);
216 foreach ($r_path as
$key => $row) {
218 if (in_array($row[
"type"], array(
"root",
"cat",
"grp",
"crs")) &&
219 $row[
"child"] != $a_ref_id) {
220 $first = $row[
"child"];
223 if ($a_stop == $row[
"child"]) {
226 $omit[$row[
"child"]] = $do_omit;
231 if ($first == $row[
"child"]) {
236 if ($add_it && !$omit[$row[
"child"]] &&
237 (!$a_omit_node || ($row[
"child"] != $a_ref_id))) {
239 if ($row[
"title"] ==
"ILIAS" && $row[
"type"] ==
"root") {
240 $row[
"title"] = $this->
lng->txt(
"repository");
244 "./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" . $row[
"type"] .
"_" . $row[
"child"],
257 string $a_frame =
"",
263 $ltiview = $DIC[
'lti'];
269 if ($a_ref_id > 0 && !$ilAccess->checkAccess(
"visible",
"", $a_ref_id)) {
273 if ($ltiview->isActive()) {
276 $this->entries[] = array(
277 "title" => strip_tags(
283 "ref_id" => $a_ref_id,
290 $this->entries = array();
305 $loc_tpl =
new ilTemplate(
"tpl.locator_text_only.html",
true,
true,
"Services/Locator");
307 $loc_tpl =
new ilTemplate(
"tpl.locator.html",
true,
true,
"Services/Locator");
312 if (count($items) > 0) {
313 foreach ($items as $item) {
315 $loc_tpl->touchBlock(
"locator_separator_prefix");
318 if ($item[
"ref_id"] > 0) {
331 $loc_tpl->setCurrentBlock(
"locator_img");
332 $loc_tpl->setVariable(
"IMG_SRC", $icon_path);
333 $loc_tpl->setVariable(
337 $loc_tpl->parseCurrentBlock();
340 $loc_tpl->setCurrentBlock(
"locator_item");
341 if ($item[
"link"] !=
"") {
342 $loc_tpl->setVariable(
"LINK_ITEM", $item[
"link"]);
343 if ($item[
"frame"] !=
"") {
344 $loc_tpl->setVariable(
"LINK_TARGET",
' target="' . $item[
"frame"] .
'" ');
346 $loc_tpl->setVariable(
"ITEM", $item[
"title"]);
348 $loc_tpl->setVariable(
"PREFIX", $item[
"title"]);
350 $loc_tpl->parseCurrentBlock();
358 $loc_tpl->setVariable(
"TXT_BREADCRUMBS", $lng->
txt(
"breadcrumb_navigation"));
360 return trim($loc_tpl->get());
373 foreach ($items as $item) {
378 $str .= $item[
"title"];
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setOffline(bool $a_offline)
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addContextItems(int $a_ref_id, bool $a_omit_node=false, int $a_stop=0)
parses the objects.xml it handles the xml-description of all ilias objects
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
getTextVersion()
Get text version.
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
addAdministrationItems(int $a_ref_id=0)
add administration tree items
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilObjectDefinition $obj_definition
static _lookupType(int $id, bool $reference=false)
addRepositoryItems(int $a_ref_id=0)
setTextOnly(bool $a_textonly)
const BREADCRUMB_FULL_PATH