4 include_once
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
31 parent::__construct($a_target);
36 $this->type = self::SEL_TYPE_RADIO;
39 $this->
setRoot($tree->readRootId());
44 $this->filter =
array();
86 $this->form_items[
$type] =
true;
91 $this->form_items[
$type] =
false;
96 $this->checked_items = $a_checked_items;
106 return in_array($a_id, $this->checked_items) ? true :
false;
111 $this->post_var = $a_post_var;
120 if (!array_key_exists(
$a_type, $this->form_items) || !$this->form_items[
$a_type]) {
124 switch ($this->type) {
125 case self::SEL_TYPE_CHECK:
129 case self::SEL_TYPE_RADIO:
139 if (!isset($a_node_id) or !is_array($a_option)) {
140 $this->
ilias->raiseError(get_class($this) .
"::formatObject(): Missing parameter or wrong datatype! " .
141 "node_id: " . $a_node_id .
" options:" . var_dump($a_option), $this->
ilias->error_obj->WARNING);
145 foreach ($a_option[
"tab"] as $picture) {
146 if ($picture ==
'plus') {
147 $tpl->setCurrentBlock(
"expander");
148 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"expand"));
150 $tpl->setVariable(
"LINK_NAME", $a_node_id);
151 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
152 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
153 $tpl->parseCurrentBlock();
157 if ($picture ==
'minus' && $this->show_minus) {
158 $tpl->setCurrentBlock(
"expander");
159 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"collapse"));
161 $tpl->setVariable(
"LINK_NAME", $a_node_id);
162 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
163 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
164 $tpl->parseCurrentBlock();
170 $tpl->setCurrentBlock(
"blank");
171 $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
172 $tpl->parseCurrentBlock();
175 if ($this->output_icons) {
176 $tpl->setCurrentBlock(
"icon");
177 $tpl->setVariable(
"ICON_IMAGE", $this->
getImage(
"icon_" . $a_option[
"type"] .
".svg", $a_option[
"type"], $a_obj_id));
179 $tpl->setVariable(
"TARGET_ID",
"iconid_" . $a_node_id);
180 $this->iconList[] =
"iconid_" . $a_node_id;
181 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
182 $tpl->parseCurrentBlock();
185 if (strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type']))) {
186 $tpl->setCurrentBlock(
'check');
187 $tpl->setVariable(
'OBJ_CHECK', $formItem);
188 $tpl->parseCurrentBlock();
191 if ($this->
isClickable($a_option[
"type"], $a_node_id, $a_obj_id)) {
192 $tpl->setCurrentBlock(
"link");
200 if ($style_class !=
"") {
201 $tpl->setVariable(
"A_CLASS",
' class="' . $style_class .
'" ');
204 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !=
"") {
205 $tpl->setVariable(
"ONCLICK",
"onClick=\"$onclick\"");
208 $tpl->setVariable(
"LINK_NAME", $a_node_id);
211 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
214 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]),
218 $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
219 if ($frame_target !=
"") {
220 $tpl->setVariable(
"TARGET",
" target=\"" . $frame_target .
"\"");
222 $tpl->parseCurrentBlock();
224 $tpl->setCurrentBlock(
"text");
227 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
234 $tpl->parseCurrentBlock();
237 $tpl->setCurrentBlock(
"list_item");
238 $tpl->parseCurrentBlock();
239 $tpl->touchBlock(
"element");
259 $tpl->setCurrentBlock(
"icon");
260 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
263 $title = $lng->txt(
"repository");
268 $tpl->parseCurrentBlock();
270 if (strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type']))) {
271 $tpl->setCurrentBlock(
'check');
272 $tpl->setVariable(
'OBJ_CHECK', $formItem);
273 $tpl->parseCurrentBlock();
276 if ($this->
isMapped(ROOT_FOLDER_ID)) {
279 '<font style="font-weight: bold">' .
$title .
'</font>' 296 return '<font style="font-weight: bold">' .
$title .
'</font>';
299 return '<font style="font-style: italic">' .
$title .
'</font>';
309 include_once
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
316 $this->mappings[$ref_id] =
$GLOBALS[
'tree']->getPathId($ref_id, 1);
323 return array_key_exists($a_ref_id, $this->mappings);
328 foreach ($this->mappings as $ref_id => $parent_nodes) {
329 if (in_array($a_ref_id, $parent_nodes)) {
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
formatHeader($tpl, $a_obj_id, $a_option)
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
initMappings()
Init (read) current mappings.
getNodeStyleClass($a_id, $a_type)
get style class for node
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
buildFormItem($a_node_id, $a_type)
__construct($a_target, $a_sid, $a_mid)
formatObject($tpl, $a_node_id, $a_option, $a_obj_id=0)
setOrderColumn($a_column)
set the order column public
setFiltered($a_bool)
active/deactivate the filter public
createTarget($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
Creates Get Parameter private.
buildOnClick($a_node_id, $a_type, $a_title)
get onclick event handling (may be overwritten by derived classes)
redirection script todo: (a better solution should control the processing via a xml file) ...
buildTitle($title, $a_obj_id, $a_type)
Format title (bold for direct mappings, italic for child mappings)
static getRuleRefIds($a_sid, $a_mid)
Create styles array
The data for the language used.
setRoot($a_root_id)
Set root node.
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? public
Class ilExplorer class for explorer view in admin frame.
setCheckedItems($a_checked_items=array())
getImage($a_name, $a_type="", $a_obj_id="")
get image path (may be overwritten by derived classes)
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
no item is clickable
addFormItemForType($type)
Add form item.
addFilter($a_item)
adds item to the filter public
hasParentMapping($a_ref_id)
buildDescription($a_desc, $a_id, $a_type)
standard implementation for description, may be overwritten by derived classes
removeFormItemForType($type)
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public