ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjectSelector.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4/*
5* Repository Explorer
6*
7* @author Stefan Meyer <meyer@leifos.com>
8* @version $Id: class.ilObjectSelector.php 4880 2004-09-06 10:55:33Z smeyer $
9*
10* @package core
11*/
12
13require_once("./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
14
16{
17
23 public $root_id;
24 public $output;
25 public $ctrl;
26
28 public $ref_id;
29
33 function ilObjectSelector($a_target)
34 {
35 global $tree, $ilCtrl;
36
37 $this->ctrl = $ilCtrl;
38
39 parent::ilExplorer($a_target);
40 $this->tree = $tree;
41 $this->root_id = $this->tree->readRootId();
42 $this->order_column = "title";
43
44 $this->setSessionExpandVariable("paya_link_expand");
45
46 // add here all container objects
47 #$this->addFilter("root");
48 #$this->addFilter("cat");
49
50 #$this->setFilterMode(IL_FM_NEGATIVE);
51 $this->setFiltered(false);
52 }
53
54 function buildLinkTarget($a_node_id, $a_type)
55 {
56 if($a_type == $this->selectable_type)
57 {
58 $this->ctrl->setParameterByClass('ilpaymentobjectgui','source_id',$a_node_id);
59 return $this->ctrl->getLinkTargetByClass('ilpaymentobjectgui','linkChilds');
60 }
61 else
62 {
63 $this->ctrl->setParameterByClass('ilrepositorygui',"ref_id",$this->ref_id);
64 return $this->ctrl->getLinkTargetByClass('ilrepositorygui','linkSelector');
65 }
66 }
67
68 function buildFrameTarget($a_type, $a_child = 0, $a_obj_id = 0)
69 {
70 return '';
71 }
72
73 function isClickable($a_type, $a_ref_id)
74 {
75 return $a_type == $this->selectable_type and $a_ref_id != $this->ref_id;
76 }
77
78 function showChilds($a_ref_id)
79 {
80 global $rbacsystem;
81
82 if ($a_ref_id == 0)
83 {
84 return true;
85 }
86
87 if ($rbacsystem->checkAccess("read", $a_ref_id))
88 {
89 return true;
90 }
91 else
92 {
93 return false;
94 }
95 }
96
97
105 function formatHeader($a_obj_id, $a_option)
106 {
107 global $lng;
108
109 $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
110
111 $tpl->setCurrentBlock("text");
112 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
113 $tpl->parseCurrentBlock();
114
115 $tpl->setCurrentBlock("row");
116 $tpl->parseCurrentBlock();
117
118 $this->output[] = $tpl->get();
119 }
120
121} // END class ilObjectSelector
122?>
global $tpl
Definition: ilias.php:8
Class ilExplorer class for explorer view in admin frame.
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
setFiltered($a_bool)
active/deactivate the filter @access public
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
isClickable($a_type, $a_ref_id)
check if links for certain object type are activated
showChilds($a_ref_id)
determines wether the childs of an object should be shown or not note: this standard implementation a...
formatHeader($a_obj_id, $a_option)
overwritten method from base class @access public
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
special template class to simplify handling of ITX/PEAR
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40