29 $this->entries =
array();
31 $this->offline =
false;
41 $this->textonly = $a_textonly;
46 $this->offline = $a_offline;
51 return $this->offline;
61 return $this->textonly;
76 $a_ref_id =
$_GET[
"ref_id"];
79 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
86 $a_start = ROOT_FOLDER_ID;
91 $path = $tree->getPathFull($a_ref_id,$a_start);
96 if (!in_array(
$row[
"type"],
array(
"root",
"cat",
"crs",
"fold",
"grp",
"prg")))
100 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root")
102 $row[
"title"] = $this->lng->txt(
"repository");
105 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$row[
"child"]);
107 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
109 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
126 $a_ref_id =
$_GET[
"ref_id"];
131 $path = $tree->getPathFull($a_ref_id);
136 if (!in_array(
$row[
"type"],
array(
"root",
"cat",
"crs",
"fold",
"grp")))
141 if (
$row[
"child"] == ROOT_FOLDER_ID)
143 $row[
"title"] = $lng->txt(
"repository");
146 $class_name = $objDefinition->getClassName(
$row[
"type"]);
147 $class = strtolower(
"ilObj".$class_name.
"GUI");
148 $ilCtrl->setParameterByClass($class,
"ref_id",
$row[
"child"]);
150 $ilCtrl->getLinkTargetbyClass($class,
"view"),
"",
$row[
"child"]);
161 $path = $tree->getPathFull($a_ref_id);
165 $r_path = array_reverse(
$path);
169 foreach ($r_path as $key =>
$row)
173 if (in_array(
$row[
"type"],
array(
"root",
"cat",
"grp",
"crs")) &&
174 $row[
"child"] != $a_ref_id)
176 $first =
$row[
"child"];
179 if ($a_stop ==
$row[
"child"])
183 $omit[
$row[
"child"]] = $do_omit;
189 if ($first ==
$row[
"child"])
195 if ($add_it && !$omit[
$row[
"child"]] &&
196 (!$a_omit_node || (
$row[
"child"] != $a_ref_id)))
199 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root")
201 $row[
"title"] = $this->lng->txt(
"repository");
204 "./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
$row[
"type"].
"_".
$row[
"child"],
205 "_top", $row[
"child"], $row[
"type"]);
218 function addItem($a_title, $a_link, $a_frame =
"", $a_ref_id = 0, $type = null)
222 if ($a_ref_id > 0 && !$ilAccess->checkAccess(
"visible",
"", $a_ref_id))
227 $this->entries[] =
array(
"title" => $a_title,
228 "link" => $a_link,
"frame" => $a_frame,
"ref_id" => $a_ref_id,
"type" => $type);
236 $this->entries =
array();
256 $loc_tpl =
new ilTemplate(
"tpl.locator_text_only.html",
true,
true,
"Services/Locator");
260 $loc_tpl =
new ilTemplate(
"tpl.locator.html",
true,
true,
"Services/Locator");
266 if (is_array($items))
268 foreach($items as $item)
272 $loc_tpl->touchBlock(
"locator_separator_prefix");
275 if ($item[
"ref_id"] > 0)
286 $loc_tpl->setCurrentBlock(
"locator_img");
287 $loc_tpl->setVariable(
"IMG_SRC", $icon_path);
288 $loc_tpl->setVariable(
"IMG_ALT",
289 $lng->txt(
"obj_".$type));
290 $loc_tpl->parseCurrentBlock();
293 $loc_tpl->setCurrentBlock(
"locator_item");
294 if ($item[
"link"] !=
"")
296 $loc_tpl->setVariable(
"LINK_ITEM", $item[
"link"]);
297 if ($item[
"frame"] !=
"")
299 $loc_tpl->setVariable(
"LINK_TARGET",
' target="'.$item[
"frame"].
'" ');
301 $loc_tpl->setVariable(
"ITEM", $item[
"title"]);
305 $loc_tpl->setVariable(
"PREFIX", $item[
"title"]);
307 $loc_tpl->parseCurrentBlock();
314 $loc_tpl->setVariable(
"NOITEM",
" ");
315 $loc_tpl->touchBlock(
"locator");
317 $loc_tpl->setVariable(
"TXT_BREADCRUMBS", $lng->txt(
"breadcrumb_navigation"));
319 return trim($loc_tpl->get());
333 if (is_array($items))
335 foreach($items as $item)
342 $str.= $item[
"title"];
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
__construct()
Constructor.
static getInstance()
Get instance.
addRepositoryItems($a_ref_id=0)
add repository item