53 $this->tree = $DIC->repositoryTree();
54 $this->ctrl = $DIC->ctrl();
55 $this->obj_definition = $DIC[
"objDefinition"];
56 $this->access = $DIC->access();
58 $lng = $DIC->language();
61 $this->entries = array();
63 $this->offline =
false;
73 $this->textonly = $a_textonly;
78 $this->offline = $a_offline;
83 return $this->offline;
93 return $this->textonly;
108 if ($a_ref_id == 0) {
109 $a_ref_id =
$_GET[
"ref_id"];
112 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
116 $a_start = ROOT_FOLDER_ID;
120 $path =
$tree->getPathFull($a_ref_id, $a_start);
124 foreach (
$path as $k => $v) {
125 if ($v[
"type"] ==
"crs") {
126 $crs_ref_id = $v[
"child"];
129 if (!$setting->get(
"rep_breadcr_crs")) {
131 } elseif ($setting->get(
"rep_breadcr_crs_overwrite")) {
144 if (!in_array(
$row[
"type"], array(
"root",
"cat",
"crs",
"fold",
"grp",
"prg",
"lso"))) {
147 if ($crs_ref_id > 0 &&
$row[
"child"] == $crs_ref_id) {
150 if ($crs_ref_id > 0) {
154 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root") {
155 $row[
"title"] = $this->lng->txt(
"repository");
158 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$row[
"child"]);
161 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
165 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
183 if ($a_ref_id == 0) {
184 $a_ref_id =
$_GET[
"ref_id"];
192 if (!in_array(
$row[
"type"], array(
"root",
"cat",
"crs",
"fold",
"grp"))) {
196 if (
$row[
"child"] == ROOT_FOLDER_ID) {
197 $row[
"title"] =
$lng->txt(
"repository");
200 $class_name = $objDefinition->getClassName(
$row[
"type"]);
201 $class = strtolower(
"ilObj" . $class_name .
"GUI");
202 $ilCtrl->setParameterByClass($class,
"ref_id",
$row[
"child"]);
205 $ilCtrl->getLinkTargetbyClass($class,
"view"),
222 $r_path = array_reverse(
$path);
228 if (in_array(
$row[
"type"], array(
"root",
"cat",
"grp",
"crs")) &&
229 $row[
"child"] != $a_ref_id) {
230 $first =
$row[
"child"];
233 if ($a_stop ==
$row[
"child"]) {
236 $omit[
$row[
"child"]] = $do_omit;
241 if ($first ==
$row[
"child"]) {
246 if ($add_it && !$omit[
$row[
"child"]] &&
247 (!$a_omit_node || (
$row[
"child"] != $a_ref_id))) {
249 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root") {
250 $row[
"title"] = $this->lng->txt(
"repository");
254 "./goto.php?client_id=" . rawurlencode(CLIENT_ID) .
"&target=" .
$row[
"type"] .
"_" .
$row[
"child"],
271 public function addItem($a_title, $a_link, $a_frame =
"", $a_ref_id = 0,
$type = null)
275 $ltiview = $DIC[
'lti'];
279 if ($a_ref_id > 0 && !$ilAccess->checkAccess(
"visible",
"", $a_ref_id)) {
283 if ($ltiview->isActive()) {
286 $this->entries[] = array(
"title" => $a_title,
287 "link" => $a_link,
"frame" => $a_frame,
"ref_id" => $a_ref_id,
"type" =>
$type);
295 $this->entries = array();
312 $ltiview = $DIC[
"lti"];
313 if ($ltiview->isActive() && !$ltiview->show_locator) {
320 $loc_tpl =
new ilTemplate(
"tpl.locator_text_only.html",
true,
true,
"Services/Locator");
322 $loc_tpl =
new ilTemplate(
"tpl.locator.html",
true,
true,
"Services/Locator");
328 if (is_array($items)) {
329 foreach ($items as $item) {
331 $loc_tpl->touchBlock(
"locator_separator_prefix");
334 if ($item[
"ref_id"] > 0) {
339 $icon_path = ilObject::_getIcon(
347 $loc_tpl->setCurrentBlock(
"locator_img");
348 $loc_tpl->setVariable(
"IMG_SRC", $icon_path);
349 $loc_tpl->setVariable(
353 $loc_tpl->parseCurrentBlock();
356 $loc_tpl->setCurrentBlock(
"locator_item");
357 if ($item[
"link"] !=
"") {
358 $loc_tpl->setVariable(
"LINK_ITEM", $item[
"link"]);
359 if ($item[
"frame"] !=
"") {
360 $loc_tpl->setVariable(
"LINK_TARGET",
' target="' . $item[
"frame"] .
'" ');
362 $loc_tpl->setVariable(
"ITEM", $item[
"title"]);
364 $loc_tpl->setVariable(
"PREFIX", $item[
"title"]);
366 $loc_tpl->parseCurrentBlock();
371 $loc_tpl->setVariable(
"NOITEM",
" ");
372 $loc_tpl->touchBlock(
"locator");
374 $loc_tpl->setVariable(
"TXT_BREADCRUMBS",
$lng->txt(
"breadcrumb_navigation"));
376 return trim($loc_tpl->get());
391 if (is_array($items)) {
392 foreach ($items as $item) {
397 $str .= $item[
"title"];
getHTML()
Get locator HTML.
addItem($a_title, $a_link, $a_frame="", $a_ref_id=0, $type=null)
add locator item
clearItems()
Clear all Items.
addContextItems($a_ref_id, $a_omit_node=false, $a_stop=0)
getItems()
Get all locator entries.
getTextOnly()
Get Only text, no HTML.
addAdministrationItems($a_ref_id=0)
add administration tree items
getTextVersion()
Get text version.
setTextOnly($a_textonly)
Set Only text, no HTML.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
static _lookupType($a_id, $a_reference=false)
lookup object type
__construct()
Constructor.
static getInstance()
Get instance.
addRepositoryItems($a_ref_id=0)
add repository item
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
const BREADCRUMB_FULL_PATH