ILIAS  release_4-4 Revision
ilIntLinkRepItemExplorer Class Reference

Internal Link: Repository Item Selector Explorer. More...

+ Inheritance diagram for ilIntLinkRepItemExplorer:
+ Collaboration diagram for ilIntLinkRepItemExplorer:

Public Member Functions

 ilLMMenuObjectSelector ($a_target)
 Constructor public. More...
 
 setSelectableTypes ($a_types)
 
 setMode ($a_mode)
 
 setSetLinkTargetScript ($a_script)
 Set "set link target" script. More...
 
 getSetLinkTargetScript ()
 Get "set link target" script. More...
 
 setRefId ($a_ref_id)
 
 buildLinkTarget ($a_node_id, $a_type)
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 
 isClickable ($a_type, $a_ref_id)
 return if item is clickable More...
 
 buildTitle ($a_title, $a_id, $a_type)
 build item title More...
 
 buildDescription ($a_desc, $a_id, $a_type)
 standard implementation for description, may be overwritten by derived classes More...
 
 buildOnClick ($a_node_id, $a_type, $a_title)
 get onclick event handling More...
 
 showChilds ($a_ref_id)
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class public More...
 
- Public Member Functions inherited from ilExplorer
 ilExplorer ($a_target)
 Constructor public. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setAsynchExpanding ($a_val)
 Set asynch expanding. More...
 
 getAsynchExpanding ()
 Get asynch expanding. More...
 
 initItemCounter ($a_number)
 Init item counter. More...
 
 setTitle ($a_val)
 Set title. More...
 
 setTitleLength ($a_length)
 Set max title length. More...
 
 getTitleLength ()
 Get max title length. More...
 
 getTitle ()
 Get title. More...
 
 setRoot ($a_root_id)
 Set root node. More...
 
 getRoot ()
 get root id More...
 
 setOrderColumn ($a_column)
 set the order column public More...
 
 setOrderDirection ($a_direction)
 set the order direction public More...
 
 setTargetGet ($a_target_get)
 set the varname in Get-string public More...
 
 setParamsGet ($a_params_get)
 set additional params to be passed in Get-string public More...
 
 setExpandTarget ($a_exp_target)
 target script for expand icons More...
 
 setFrameUpdater ($a_up_frame, $a_up_script, $a_params="")
 Set Explorer Updater. More...
 
 highlightNode ($a_id)
 set highlighted node More...
 
 checkPermissions ($a_check)
 check permissions via rbac More...
 
 setSessionExpandVariable ($a_var_name="expand")
 set name of expand session variable More...
 
 outputIcons ($a_icons)
 output icons More...
 
 setClickable ($a_type, $a_clickable)
 (de-)activates links for a certain object type More...
 
 isVisible ($a_ref_id, $a_type)
 
 setTreeLead ($a_val)
 Set tree leading content. More...
 
 getTreeLead ()
 Get tree leading content. More...
 
 isClickable ($a_type, $a_ref_id=0)
 check if links for certain object type are activated More...
 
 setPostSort ($a_sort)
 process post sorting More...
 
 setFilterMode ($a_mode=IL_FM_NEGATIVE)
 set filter mode More...
 
 getFilterMode ()
 get filter mode More...
 
 setUseStandardFrame ($a_val)
 Set use standard frame. More...
 
 getUseStandardFrame ()
 Get use standard explorer frame. More...
 
 getChildsOfNode ($a_parent_id)
 Get childs of node. More...
 
 setOutput ($a_parent_id, $a_depth=1, $a_obj_id=0, $a_highlighted_subtree=false)
 Creates output for explorer view in admin menue recursive method public. More...
 
 modifyChilds ($a_parent_id, $a_objects)
 
 showChilds ($a_parent_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g. More...
 
 forceExpanded ($a_obj_id)
 force expansion of node More...
 
 getMaximumTreeDepth ()
 Get maximum tree depth. More...
 
 getOutput ()
 Creates output recursive method public. More...
 
 handleListEndTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list end tags ( and ) More...
 
 handleListStartTags (&$a_tpl_tree, $a_cur_depth, $a_item_depth)
 handle list start tags ( More...
 
 formatHeader (&$tpl, $a_obj_id, $a_option)
 Creates output for header (is empty here but can be overwritten in derived classes) More...
 
 formatObject (&$tpl, $a_node_id, $a_option, $a_obj_id=0)
 Creates output recursive method private. More...
 
 getImage ($a_name, $a_type="", $a_obj_id="")
 get image path (may be overwritten by derived classes) More...
 
 getImageAlt ($a_default_text, $a_type="", $a_obj_id="")
 get image alt text More...
 
 getNodeStyleClass ($a_id, $a_type)
 get style class for node More...
 
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes) More...
 
 buildOnClick ($a_node_id, $a_type, $a_title)
 get onclick event handling (may be overwritten by derived classes) More...
 
 buildTitle ($a_title, $a_id, $a_type)
 standard implementation for title, may be overwritten by derived classes More...
 
 buildDescription ($a_desc, $a_id, $a_type)
 standard implementation for description, may be overwritten by derived classes More...
 
 buildSelect ($a_node_id, $a_type)
 standard implementation for adding an option select box between image and title More...
 
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes) More...
 
 createTarget ($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
 Creates Get Parameter private. More...
 
 setFrameTarget ($a_target)
 set target frame or not frame? More...
 
 createLines ($a_depth)
 Creates lines for explorer view private. More...
 
 is_in_array ($a_start, $a_depth)
 DESCRIPTION MISSING private. More...
 
 getIndex ($a_data)
 get index of format_options array from specific ref_id,parent_id private More...
 
 addFilter ($a_item)
 adds item to the filter public More...
 
 delFilter ($a_item)
 removes item from the filter public More...
 
 setExpand ($a_node_id)
 set the expand option this value is stored in a SESSION variable to save it different view (lo view, frm view,...) private More...
 
 forceExpandAll ($a_mode, $a_show_minus=true)
 force expandAll. More...
 
 setFiltered ($a_bool)
 active/deactivate the filter public More...
 
 checkFilter ($a_item)
 check if item is in filter private More...
 
 sortNodes ($a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array private More...
 

Data Fields

 $mode = "text"
 
- Data Fields inherited from ilExplorer
 $id
 
 $ilias
 
 $output
 
 $format_options
 
 $tree
 
 $target
 
 $target_get
 
 $params_get
 
 $expanded
 
 $order_column
 
 $order_direction = "asc"
 
 $expand_target
 
 $rbac_check
 
 $output_icons
 
 $expand_variable
 
 $is_clickable
 
 $post_sort
 
 $filtered = false
 
 $filter_mode
 
 $expand_all = false
 
 $root_id = null
 
 $use_standard_frame = false
 

Detailed Description

Internal Link: Repository Item Selector Explorer.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 35 of file class.ilIntLinkRepItemExplorer.php.

Member Function Documentation

◆ buildDescription()

ilIntLinkRepItemExplorer::buildDescription (   $a_desc,
  $a_id,
  $a_type 
)

standard implementation for description, may be overwritten by derived classes

Definition at line 152 of file class.ilIntLinkRepItemExplorer.php.

References $ilUser.

153  {
154  global $ilUser;
155 
156  if ($ilUser->getPref("ilPageEditor_JavaScript") != "enable" &&
157  $this->mode != "asynch")
158  {
159  if (in_array($a_type,$this->selectable_types))
160  {
161  if ($this->mode != "link")
162  {
163  return "[iln ".$a_type."=\"$a_id\"] [/iln]";
164  }
165  }
166  }
167  return "";
168  }
global $ilUser
Definition: imgupload.php:15

◆ buildFrameTarget()

ilIntLinkRepItemExplorer::buildFrameTarget (   $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

Definition at line 110 of file class.ilIntLinkRepItemExplorer.php.

111  {
112  if ($this->mode == "link")
113  {
114 // return "content";
115  }
116  else
117  {
118  return '';
119  }
120  }

◆ buildLinkTarget()

ilIntLinkRepItemExplorer::buildLinkTarget (   $a_node_id,
  $a_type 
)

Definition at line 91 of file class.ilIntLinkRepItemExplorer.php.

References ilUtil\appendUrlParameterString(), and getSetLinkTargetScript().

92  {
93  if ($this->getSetLinkTargetScript() == "")
94  {
95  return "#";
96  }
97  else
98  {
99  //$tpl->setVariable("LINK_TARGET", "content");
100  $link =
102  "linktype=RepositoryItem".
103  "&linktarget=il__".$a_type."_".$a_node_id);
104 
105  return ($link);
106  }
107  }
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
getSetLinkTargetScript()
Get "set link target" script.
+ Here is the call graph for this function:

◆ buildOnClick()

ilIntLinkRepItemExplorer::buildOnClick (   $a_node_id,
  $a_type,
  $a_title 
)

get onclick event handling

Definition at line 173 of file class.ilIntLinkRepItemExplorer.php.

References getSetLinkTargetScript().

174  {
175  if ($this->getSetLinkTargetScript() == "")
176  {
177  return "return il.IntLink.addInternalLink('[iln ".$a_type."="".$a_node_id.""]','[/iln]', event);";
178  }
179 // else
180 // {
181 // return "parent.content.addInternalLink('[iln ".$a_type."="".$a_node_id.""] [/iln]','".$a_title."');setTimeout('window.close()',300);return(false);";
182 // }
183  }
getSetLinkTargetScript()
Get "set link target" script.
+ Here is the call graph for this function:

◆ buildTitle()

ilIntLinkRepItemExplorer::buildTitle (   $a_title,
  $a_id,
  $a_type 
)

build item title

Definition at line 144 of file class.ilIntLinkRepItemExplorer.php.

145  {
146  return $a_title;
147  }

◆ formatHeader()

ilIntLinkRepItemExplorer::formatHeader ( $tpl,
  $a_obj_id,
  $a_option 
)

overwritten method from base class public

Parameters
integerobj_id
integerarray options
Returns
string

Definition at line 214 of file class.ilIntLinkRepItemExplorer.php.

References ilExplorer\$ilias, $lng, $tpl, and ilUtil\getImagePath().

215  {
216  global $lng, $ilias;
217 
218  $tpl->setCurrentBlock("icon");
219  $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_root_s.png"));
220  $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
221  $tpl->parseCurrentBlock();
222 
223  $tpl->setCurrentBlock("text");
224  $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
225  $tpl->parseCurrentBlock();
226 
227  //$tpl->setCurrentBlock("row");
228  //$tpl->parseCurrentBlock();
229 
230  $tpl->touchBlock("element");
231 
232  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getSetLinkTargetScript()

ilIntLinkRepItemExplorer::getSetLinkTargetScript ( )

Get "set link target" script.

Definition at line 80 of file class.ilIntLinkRepItemExplorer.php.

Referenced by buildLinkTarget(), and buildOnClick().

81  {
82  return $this->link_target_script;
83  }
+ Here is the caller graph for this function:

◆ ilLMMenuObjectSelector()

ilIntLinkRepItemExplorer::ilLMMenuObjectSelector (   $a_target)

Constructor public.

Parameters
stringscriptname
intuser_id

Definition at line 45 of file class.ilIntLinkRepItemExplorer.php.

References $ilCtrl, and ilExplorer\$tree.

46  {
47  global $tree,$ilCtrl;
48 
49  $this->ctrl =& $ilCtrl;
50  parent::ilExplorer($a_target);
51  }
global $ilCtrl
Definition: ilias.php:18

◆ isClickable()

ilIntLinkRepItemExplorer::isClickable (   $a_type,
  $a_ref_id 
)

return if item is clickable

Definition at line 125 of file class.ilIntLinkRepItemExplorer.php.

References $ilUser.

126  {
127  global $ilUser;
128 
129  if ($ilUser->getPref("ilPageEditor_JavaScript") != "enable"
130  && $this->mode != "link" && $this->mode != "asynch")
131  {
132  return false;
133  }
134  else
135  {
136  return in_array($a_type,$this->selectable_types);
137  }
138  }
global $ilUser
Definition: imgupload.php:15

◆ setMode()

ilIntLinkRepItemExplorer::setMode (   $a_mode)

Definition at line 58 of file class.ilIntLinkRepItemExplorer.php.

References ilExplorer\setAsynchExpanding().

59  {
60  $this->mode = $a_mode;
61  if ($this->mode == "asynch")
62  {
63  $this->setAsynchExpanding(true);
64  }
65  }
setAsynchExpanding($a_val)
Set asynch expanding.
+ Here is the call graph for this function:

◆ setRefId()

ilIntLinkRepItemExplorer::setRefId (   $a_ref_id)

Definition at line 86 of file class.ilIntLinkRepItemExplorer.php.

87  {
88  $this->ref_id = $a_ref_id;
89  }

◆ setSelectableTypes()

ilIntLinkRepItemExplorer::setSelectableTypes (   $a_types)

Definition at line 53 of file class.ilIntLinkRepItemExplorer.php.

54  {
55  $this->selectable_types = $a_types;
56  }

◆ setSetLinkTargetScript()

ilIntLinkRepItemExplorer::setSetLinkTargetScript (   $a_script)

Set "set link target" script.

Parameters
<type>$a_script

Definition at line 72 of file class.ilIntLinkRepItemExplorer.php.

73  {
74  $this->link_target_script = $a_script;
75  }

◆ showChilds()

ilIntLinkRepItemExplorer::showChilds (   $a_ref_id)

Definition at line 187 of file class.ilIntLinkRepItemExplorer.php.

188  {
189  global $rbacsystem;
190 
191  if ($a_ref_id == 0)
192  {
193  return true;
194  }
195 
196  if ($rbacsystem->checkAccess("read", $a_ref_id))
197  {
198  return true;
199  }
200  else
201  {
202  return false;
203  }
204  }

Field Documentation

◆ $mode

ilIntLinkRepItemExplorer::$mode = "text"

Definition at line 37 of file class.ilIntLinkRepItemExplorer.php.


The documentation for this class was generated from the following file: