25 require_once
"./Services/Object/classes/class.ilObject.php";
43 public function __construct($a_id = 0, $a_call_by_reference =
true)
46 parent::__construct($a_id, $a_call_by_reference);
53 if ($this->
getId() != ROLE_FOLDER_ID) {
55 $this->
setTitle($this->lng->txt(
"obj_" . $this->getType() .
"_local"));
66 public function delete()
69 if (!parent::delete()) {
76 $roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
79 foreach ($roles as $role_id) {
80 $roleObj =&$this->
ilias->obj_factory->getInstanceByObjId($role_id);
81 $roleObj->setParent($this->
getRefId());
98 public function createRole($a_title, $a_desc, $a_import_id = 0)
102 include_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
104 $roleObj->setTitle($a_title);
105 $roleObj->setDescription($a_desc);
107 if ($a_import_id !=
"") {
109 $roleObj->setImportId($a_import_id);
114 $rbacadmin->assignRoleToFolder($roleObj->getId(), $this->
getRefId(),
"y");
128 $local_roles = $rbacreview->getRolesOfRoleFolder($this->
getRefId());
130 if (count($local_roles) == 0) {
131 $rbacadmin->revokePermission($this->
getRefId());
134 $deleted_tree =
new ilTree($tree_id, -(
int) $tree_id);
135 $deleted_tree->deleteTree($deleted_tree->getNodeData($this->getRefId()));
137 $tree->deleteTree($tree->getNodeData($this->getRefId()));
155 $q =
"SELECT tree FROM tree WHERE child= " . $this->
ilias->db->quote($this->
getRefId()) .
" ";
158 if (
$row->tree < 0) {
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
createRole($a_title, $a_desc, $a_import_id=0)
creates a local role in current rolefolder (this object)
isDeleted()
checks if role folder is in trash private
setTitle($a_title)
set object title
getId()
get object id public
getTitle()
get object title public
getDescription()
get object description
redirection script todo: (a better solution should control the processing via a xml file) ...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
purge()
checks if rolefolder contains any roles.
getRefId()
get reference id public
setDescription($a_desc)
set object description