ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSearchRootSelector Class Reference
+ Inheritance diagram for ilSearchRootSelector:
+ Collaboration diagram for ilSearchRootSelector:

Public Member Functions

 __construct ($a_target)
 Constructor public. More...
 
 setPathOpen (int $ref_id)
 
 setClickableTypes (array $a_types)
 
 isClickable (string $type, int $ref_id=0)
 
 setTargetClass (string $a_class)
 
 getTargetClass ()
 
 setCmd (string $a_cmd)
 
 getCmd ()
 
 setSelectableType (string $a_type)
 
 getSelectableType ()
 
 setRefId (int $a_ref_id)
 
 getRefId ()
 
 buildLinkTarget ($a_node_id, string $a_type)
 
 buildFrameTarget (string $a_type, $a_child=0, $a_obj_id=0)
 
 showChilds ($a_parent_id)
 
 formatHeader (ilTemplate $tpl, $a_obj_id, array $a_option)
 
- Public Member Functions inherited from ilExplorer
 setId (string $a_val)
 
 getId ()
 
 setAsynchExpanding (bool $a_val)
 
 getAsynchExpanding ()
 
 initItemCounter (int $a_number)
 
 setTitle (string $a_val)
 
 setTitleLength (int $a_length)
 
 getTitleLength ()
 
 getTitle ()
 
 setRoot ($a_root_id)
 
 getRoot ()
 
 setOrderColumn (string $a_column)
 
 setOrderDirection (string $a_direction)
 
 setTargetGet (string $a_target_get)
 
 setParamsGet (array $a_params_get)
 
 setExpandTarget (string $a_exp_target)
 target script for expand icons More...
 
 setFrameUpdater (string $a_up_frame, string $a_up_script, string $a_params="")
 
 highlightNode (string $a_id)
 
 checkPermissions (bool $a_check)
 
 setSessionExpandVariable (string $a_var_name="expand")
 
 outputIcons (bool $a_icons)
 
 setClickable (string $a_type, bool $a_clickable)
 
 isVisible ( $a_ref_id, string $a_type)
 
 setTreeLead (string $a_val)
 
 getTreeLead ()
 
 isClickable (string $type, int $ref_id=0)
 
 setPostSort (bool $a_sort)
 
 setFilterMode (int $a_mode=IL_FM_NEGATIVE)
 
 getFilterMode ()
 
 setUseStandardFrame (bool $a_val)
 Set use standard frame. More...
 
 getUseStandardFrame ()
 
 getChildsOfNode ($a_parent_id)
 
 setOutput ( $a_parent_id, int $a_depth=1, int $a_obj_id=0, bool $a_highlighted_subtree=false)
 Creates output for explorer view in admin menue recursive method. More...
 
 modifyChilds ( $a_parent_id, array $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 ()
 
 getOutput ()
 
 handleListEndTags (ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
 handle list end tags ( and ) More...
 
 handleListStartTags (ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
 handle list start tags ( More...
 
 formatHeader (ilTemplate $tpl, $a_obj_id, array $a_option)
 
 formatObject (ilTemplate $tpl, $a_node_id, array $a_option, $a_obj_id=0)
 
 getImage (string $a_name, string $a_type="", $a_obj_id="")
 
 getImageAlt (string $a_default_text, string $a_type="", $a_obj_id="")
 
 getNodeStyleClass ( $a_id, string $a_type)
 
 buildLinkTarget ( $a_node_id, string $a_type)
 
 buildOnClick ( $a_node_id, string $a_type, string $a_title)
 
 buildTitle (string $a_title, $a_id, string $a_type)
 
 buildDescription (string $a_desc, $a_id, string $a_type)
 
 buildSelect ($a_node_id, string $a_type)
 standard implementation for adding an option select box between image and title More...
 
 buildFrameTarget (string $a_type, $a_child=0, $a_obj_id=0)
 
 createTarget (string $a_type, $a_node_id, bool $a_highlighted_subtree=false, bool $a_append_anch=true)
 
 setFrameTarget (string $a_target)
 
 createLines (int $a_depth)
 
 is_in_array (int $a_start, int $a_depth)
 
 getIndex (array $a_data)
 
 addFilter (string $a_item)
 
 delFilter (string $a_item)
 
 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,...) More...
 
 forceExpandAll (bool $a_mode, bool $a_show_minus=true)
 force expandAll. More...
 
 setFiltered (bool $a_bool)
 
 checkFilter (string $a_item)
 
 sortNodes (array $a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array More...
 

Protected Attributes

ilCtrl $ctrl
 
ilRbacSystem $system
 
- Protected Attributes inherited from ilExplorer
ilObjectDefinition $obj_definition
 
ilErrorHandling $error
 
ilRbacSystem $rbacsystem
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
 $filter = []
 
string $highlighted = ""
 
bool $show_minus = true
 
int $counter = 0
 
bool $asnch_expanding = false
 
int $textwidth = 0
 
string $title = ""
 
string $up_frame = ""
 
string $a_up_script = ""
 
string $up_params = ""
 
string $frame_target = ""
 
string $up_script = ""
 
string $tree_lead = ""
 
array $iconList = []
 
ILIAS Refinery Factory $refinery
 
ILIAS HTTP Wrapper WrapperFactory $wrapper
 

Private Attributes

string $selectable_type = ''
 
int $ref_id = 0
 
string $target_class = ''
 
array $clickable_types = []
 
string $cmd = ''
 

Additional Inherited Members

- Data Fields inherited from ilExplorer
string $id = ""
 
string $output = ""
 
array $format_options = []
 
ilTree $tree
 
string $target = ""
 
string $target_get = ""
 
string $params_get = ""
 
array $expanded = []
 
string $order_column = ""
 
string $order_direction = "asc"
 
string $expand_target = null
 
bool $rbac_check = false
 
bool $output_icons = false
 
string $expand_variable = ""
 
array $is_clickable = []
 
bool $post_sort = false
 
bool $filtered = false
 
bool $filter_mode
 
bool $expand_all = false
 
 $root_id = null
 
bool $use_standard_frame = false
 
- Protected Member Functions inherited from ilExplorer
 requestStr (string $key)
 

Detailed Description

Definition at line 27 of file class.ilSearchRootSelector.php.

Constructor & Destructor Documentation

◆ __construct()

ilSearchRootSelector::__construct (   $a_target)

Constructor public.

Parameters
stringscriptname
intuser_id

Definition at line 43 of file class.ilSearchRootSelector.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilExplorer\addFilter(), ILIAS\Repository\ctrl(), IL_FM_POSITIVE, setClickableTypes(), ilExplorer\setFiltered(), ilExplorer\setFilterMode(), ilExplorer\setSessionExpandVariable(), ilExplorer\setTitleLength(), and ilObject\TITLE_LENGTH.

44  {
45  global $DIC;
46 
47  $this->ctrl = $DIC->ctrl();
48  $this->system = $DIC->rbac()->system();
49 
50  parent::__construct($a_target);
51  $this->root_id = $this->tree->readRootId();
52  $this->order_column = "title";
53 
54  $this->setSessionExpandVariable("search_root_expand");
55 
56  // add here all container objects
57  $this->addFilter("root");
58  $this->addFilter("cat");
59  $this->addFilter("grp");
60  $this->addFilter("fold");
61  $this->addFilter("crs");
62  $this->setClickableTypes(array("root", "cat", "grp", "fold", "crs"));
63 
64  $this->setFiltered(true);
66 
68  }
setSessionExpandVariable(string $a_var_name="expand")
setFiltered(bool $a_bool)
const TITLE_LENGTH
const IL_FM_POSITIVE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitleLength(int $a_length)
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
addFilter(string $a_item)
setFilterMode(int $a_mode=IL_FM_NEGATIVE)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildFrameTarget()

ilSearchRootSelector::buildFrameTarget ( string  $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

Definition at line 131 of file class.ilSearchRootSelector.php.

131  : string
132  {
133  return '';
134  }

◆ buildLinkTarget()

ilSearchRootSelector::buildLinkTarget (   $a_node_id,
string  $a_type 
)

Definition at line 124 of file class.ilSearchRootSelector.php.

References ILIAS\Repository\ctrl(), getCmd(), and getTargetClass().

124  : string
125  {
126  $this->ctrl->setParameterByClass($this->getTargetClass(), "root_id", $a_node_id);
127 
128  return $this->ctrl->getLinkTargetByClass($this->getTargetClass(), $this->getCmd());
129  }
+ Here is the call graph for this function:

◆ formatHeader()

ilSearchRootSelector::formatHeader ( ilTemplate  $tpl,
  $a_obj_id,
array  $a_option 
)

Definition at line 153 of file class.ilSearchRootSelector.php.

References ILIAS\Repository\ctrl(), getCmd(), getTargetClass(), ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ROOT_FOLDER_ID, ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

153  : void
154  {
155  #$tpl = new ilTemplate("tpl.tree.html", true, true, "components/ILIAS/UIComponent/Explorer");
156 
157  if (in_array("root", $this->clickable_types)) {
158  $tpl->setCurrentBlock("link");
159  //$tpl->setVariable("LINK_NAME",$lng->txt('repository'));
160 
161  $this->ctrl->setParameterByClass($this->getTargetClass(), 'root_id', ROOT_FOLDER_ID);
162  $tpl->setVariable("LINK_TARGET", $this->ctrl->getLinkTargetByClass($this->getTargetClass(), $this->getCmd()));
163  $tpl->setVariable("TITLE", $this->lng->txt("repository"));
164 
165  $tpl->parseCurrentBlock();
166  }
167  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
const ROOT_FOLDER_ID
Definition: constants.php:32
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ getCmd()

ilSearchRootSelector::getCmd ( )

Definition at line 101 of file class.ilSearchRootSelector.php.

Referenced by buildLinkTarget(), and formatHeader().

101  : string
102  {
103  return $this->cmd ?: 'selectRoot';
104  }
+ Here is the caller graph for this function:

◆ getRefId()

ilSearchRootSelector::getRefId ( )

Definition at line 118 of file class.ilSearchRootSelector.php.

References $ref_id.

118  : int
119  {
120  return $this->ref_id;
121  }

◆ getSelectableType()

ilSearchRootSelector::getSelectableType ( )

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

References $selectable_type.

110  : string
111  {
112  return $this->selectable_type;
113  }

◆ getTargetClass()

ilSearchRootSelector::getTargetClass ( )

Definition at line 93 of file class.ilSearchRootSelector.php.

Referenced by buildLinkTarget(), and formatHeader().

93  : string
94  {
95  return $this->target_class ?: 'ilsearchgui';
96  }
+ Here is the caller graph for this function:

◆ isClickable()

ilSearchRootSelector::isClickable ( string  $type,
int  $ref_id = 0 
)

Definition at line 84 of file class.ilSearchRootSelector.php.

84  : bool
85  {
86  return (in_array($type, $this->clickable_types));
87  }

◆ setClickableTypes()

ilSearchRootSelector::setClickableTypes ( array  $a_types)

Definition at line 79 of file class.ilSearchRootSelector.php.

Referenced by __construct().

79  : void
80  {
81  $this->clickable_types = $a_types;
82  }
+ Here is the caller graph for this function:

◆ setCmd()

ilSearchRootSelector::setCmd ( string  $a_cmd)

Definition at line 97 of file class.ilSearchRootSelector.php.

97  : void
98  {
99  $this->cmd = $a_cmd;
100  }

◆ setPathOpen()

ilSearchRootSelector::setPathOpen ( int  $ref_id)

Definition at line 70 of file class.ilSearchRootSelector.php.

References ilExplorer\$id, and ilExplorer\setExpand().

70  : void
71  {
72  if (count($this->expanded) <= 1) {
73  foreach ($this->tree->getPathId($ref_id) as $id) {
74  $this->setExpand($id);
75  }
76  }
77  }
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ setRefId()

ilSearchRootSelector::setRefId ( int  $a_ref_id)

Definition at line 114 of file class.ilSearchRootSelector.php.

114  : void
115  {
116  $this->ref_id = $a_ref_id;
117  }

◆ setSelectableType()

ilSearchRootSelector::setSelectableType ( string  $a_type)

Definition at line 106 of file class.ilSearchRootSelector.php.

106  : void
107  {
108  $this->selectable_type = $a_type;
109  }

◆ setTargetClass()

ilSearchRootSelector::setTargetClass ( string  $a_class)

Definition at line 89 of file class.ilSearchRootSelector.php.

89  : void
90  {
91  $this->target_class = $a_class;
92  }

◆ showChilds()

ilSearchRootSelector::showChilds (   $a_parent_id)

Definition at line 136 of file class.ilSearchRootSelector.php.

136  : bool
137  {
138  if ($a_parent_id == 0) {
139  return true;
140  }
141 
142  if ($this->system->checkAccess("read", (int) $a_parent_id)) {
143  return true;
144  } else {
145  return false;
146  }
147  }

Field Documentation

◆ $clickable_types

array ilSearchRootSelector::$clickable_types = []
private

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

◆ $cmd

string ilSearchRootSelector::$cmd = ''
private

Definition at line 36 of file class.ilSearchRootSelector.php.

◆ $ctrl

ilCtrl ilSearchRootSelector::$ctrl
protected

Definition at line 29 of file class.ilSearchRootSelector.php.

◆ $ref_id

int ilSearchRootSelector::$ref_id = 0
private

Definition at line 33 of file class.ilSearchRootSelector.php.

Referenced by getRefId().

◆ $selectable_type

string ilSearchRootSelector::$selectable_type = ''
private

Definition at line 32 of file class.ilSearchRootSelector.php.

Referenced by getSelectableType().

◆ $system

ilRbacSystem ilSearchRootSelector::$system
protected

Definition at line 30 of file class.ilSearchRootSelector.php.

◆ $target_class

string ilSearchRootSelector::$target_class = ''
private

Definition at line 34 of file class.ilSearchRootSelector.php.


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