ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilRoleDesktopItemSelector.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4/*
5* Repository Explorer
6*
7* @author Stefan Meyer <meyer@leifos.com>
8* @version $Id$
9*
10*/
11
12require_once("./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
13
14
16{
17
23 public $role_desk_obj = null;
24
25
26 public $root_id;
27 public $output;
28 public $ctrl;
29
31 public $ref_id;
38 public function __construct($a_target, $role_desk_item_obj)
39 {
40 global $tree,$ilCtrl;
41
42 $this->ctrl = $ilCtrl;
43
44 $this->role_desk_obj =&$role_desk_item_obj;
45
46 parent::__construct($a_target);
47 $this->tree = $tree;
48 $this->root_id = $this->tree->readRootId();
49 $this->order_column = "title";
50
51 $this->setSessionExpandVariable("role_desk_item_link_expand");
52
53 $this->addFilter("adm");
54 $this->addFilter("rolf");
55 #$this->addFilter("chat");
56 #$this->addFilter('fold');
57
59 $this->setFiltered(true);
60
62 }
63
64 public function buildLinkTarget($a_node_id, $a_type)
65 {
66 $this->ctrl->setParameterByClass('ilobjrolegui', 'item_id', $a_node_id);
67 return $this->ctrl->getLinkTargetByClass('ilobjrolegui', 'assignDesktopItem');
68 }
69
70 public function buildFrameTarget($a_type, $a_child = 0, $a_obj_id = 0)
71 {
72 return '';
73 }
74
75 public function isClickable($a_type, $a_ref_id = 0)
76 {
77 global $rbacsystem;
78
79 return $rbacsystem->checkAccess('write', $a_ref_id) and !$this->role_desk_obj->isAssigned($a_ref_id);
80 }
81
82 public function showChilds($a_ref_id)
83 {
84 global $rbacsystem;
85
86 if ($a_ref_id) {
87 return $rbacsystem->checkAccess('read', $a_ref_id);
88 }
89 return true;
90 }
91
92
100 public function formatHeader($tpl, $a_obj_id, $a_option)
101 {
102 global $lng;
103
104 $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
105
106 $tpl->setCurrentBlock("text");
107 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
108 $tpl->parseCurrentBlock();
109
110 //$tpl->setCurrentBlock("row");
111 //$tpl->parseCurrentBlock();
112
113 $this->output[] = $tpl->get();
114 }
115} // END class ilObjectSelector
An exception for terminatinating execution or to throw for unit testing.
const IL_FM_NEGATIVE
Class ilExplorer class for explorer view in admin frame.
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter @access public
setTitleLength($a_length)
Set max title length.
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
setFiltered($a_bool)
active/deactivate the filter @access public
const TITLE_LENGTH
max length of object title
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
__construct($a_target, $role_desk_item_obj)
Constructor @access public.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
isClickable($a_type, $a_ref_id=0)
check if links for certain object type are activated
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class @access public
showChilds($a_ref_id)
determines wether the childs of an object should be shown or not note: this standard implementation a...
special template class to simplify handling of ITX/PEAR
global $ilCtrl
Definition: ilias.php:18
$a_type
Definition: workflow.php:92