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;
107 if ($a_ref_id == 0) {
108 $a_ref_id =
$_GET[
"ref_id"];
111 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
115 $a_start = ROOT_FOLDER_ID;
119 $path =
$tree->getPathFull($a_ref_id, $a_start);
123 if (!in_array(
$row[
"type"],
array(
"root",
"cat",
"crs",
"fold",
"grp",
"prg"))) {
126 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root") {
127 $row[
"title"] = $this->lng->txt(
"repository");
130 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$row[
"child"]);
133 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
137 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
155 if ($a_ref_id == 0) {
156 $a_ref_id =
$_GET[
"ref_id"];
164 if (!in_array(
$row[
"type"],
array(
"root",
"cat",
"crs",
"fold",
"grp"))) {
168 if (
$row[
"child"] == ROOT_FOLDER_ID) {
169 $row[
"title"] =
$lng->txt(
"repository");
172 $class_name = $objDefinition->getClassName(
$row[
"type"]);
173 $class = strtolower(
"ilObj" . $class_name .
"GUI");
174 $ilCtrl->setParameterByClass($class,
"ref_id",
$row[
"child"]);
177 $ilCtrl->getLinkTargetbyClass($class,
"view"),
194 $r_path = array_reverse(
$path);
200 if (in_array(
$row[
"type"],
array(
"root",
"cat",
"grp",
"crs")) &&
201 $row[
"child"] != $a_ref_id) {
202 $first =
$row[
"child"];
205 if ($a_stop ==
$row[
"child"]) {
208 $omit[
$row[
"child"]] = $do_omit;
213 if ($first ==
$row[
"child"]) {
218 if ($add_it && !$omit[
$row[
"child"]] &&
219 (!$a_omit_node || (
$row[
"child"] != $a_ref_id))) {
221 if (
$row[
"title"] ==
"ILIAS" &&
$row[
"type"] ==
"root") {
222 $row[
"title"] = $this->lng->txt(
"repository");
226 "./goto.php?client_id=" . rawurlencode(CLIENT_ID) .
"&target=" .
$row[
"type"] .
"_" .
$row[
"child"],
243 public function addItem($a_title, $a_link, $a_frame =
"", $a_ref_id = 0,
$type = null)
247 $ltiview = $DIC[
'lti'];
251 if ($a_ref_id > 0 && !$ilAccess->checkAccess(
"visible",
"", $a_ref_id)) {
255 if ($ltiview->isActive()) {
258 $this->entries[] =
array(
"title" => $a_title,
259 "link" => $a_link,
"frame" => $a_frame,
"ref_id" => $a_ref_id,
"type" =>
$type);
267 $this->entries =
array();
284 $ltiview = $DIC[
"lti"];
285 if ($ltiview->isActive() && !$ltiview->show_locator) {
292 $loc_tpl =
new ilTemplate(
"tpl.locator_text_only.html",
true,
true,
"Services/Locator");
294 $loc_tpl =
new ilTemplate(
"tpl.locator.html",
true,
true,
"Services/Locator");
300 if (is_array($items)) {
301 foreach ($items as $item) {
303 $loc_tpl->touchBlock(
"locator_separator_prefix");
306 if ($item[
"ref_id"] > 0) {
319 $loc_tpl->setCurrentBlock(
"locator_img");
320 $loc_tpl->setVariable(
"IMG_SRC", $icon_path);
321 $loc_tpl->setVariable(
325 $loc_tpl->parseCurrentBlock();
328 $loc_tpl->setCurrentBlock(
"locator_item");
329 if ($item[
"link"] !=
"") {
330 $loc_tpl->setVariable(
"LINK_ITEM", $item[
"link"]);
331 if ($item[
"frame"] !=
"") {
332 $loc_tpl->setVariable(
"LINK_TARGET",
' target="' . $item[
"frame"] .
'" ');
334 $loc_tpl->setVariable(
"ITEM", $item[
"title"]);
336 $loc_tpl->setVariable(
"PREFIX", $item[
"title"]);
338 $loc_tpl->parseCurrentBlock();
343 $loc_tpl->setVariable(
"NOITEM",
" ");
344 $loc_tpl->touchBlock(
"locator");
346 $loc_tpl->setVariable(
"TXT_BREADCRUMBS",
$lng->txt(
"breadcrumb_navigation"));
348 return trim($loc_tpl->get());
363 if (is_array($items)) {
364 foreach ($items as $item) {
369 $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