4 include_once
'./Services/Xml/classes/class.ilXmlWriter.php';
28 parent::__construct();
43 $this->roles = (
array) $a_roles;
60 public function addRole($a_role_id, $a_rolf_id)
62 $this->roles[$a_role_id][] = $a_rolf_id;
67 $this->mode = $a_mode;
81 $this->
xmlSetDtdDef(
"<!DOCTYPE Roles PUBLIC \"-//ILIAS//DTD ILIAS Roles//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_role_definition_4_2.dtd\">");
93 if ($this->
getMode() != self::MODE_DTPL) {
97 foreach ($this->
getRoles() as $role_id => $role_folder_ids) {
98 foreach ((
array) $role_folder_ids as $rolf) {
103 if ($this->
getMode() != self::MODE_DTPL) {
120 'protected' => (
$GLOBALS[
'rbacreview']->isProtected($a_rolf, $a_role_id) ? 1 : 0)
129 foreach ($rbacreview->getAllOperationsOfRole($a_role_id, $a_rolf) as $obj_group =>
$operations) {
131 $this->
xmlElement(
'operation',
array(
'group' => $obj_group), trim($this->operations[$ops_id]));
146 foreach ($rbacreview->getOperations() as $operation) {
147 $this->operations[$operation[
'ops_id']] = $operation[
'operation'];
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetGenCmt($genCmt)
Sets generated comment.
__construct()
Constructor.
write()
Write xml presentation of chosen roles.
setRoles($a_roles)
Set roles Format is: array(role_id => array(role_folder_id))
xmlSetDtdDef($dtdDef)
Sets dtd definition.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
writeHeader()
Write xml header.
static _lookupTitle($a_id)
lookup object title
xmlEndTag($tag)
Writes an endtag.
writeRole($a_role_id, $a_rolf)
Write xml presentation of one role.
static _lookupDescription($a_id)
lookup object description
xmlHeader()
Writes xml header public.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
initRbacOperations()
Cache rbac operations.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
addRole($a_role_id, $a_rolf_id)
Add one role.
Xml export of roles and role templates.