25 $ilUser = $DIC->user();
35 public function setType(
string $type): void
37 $this->role_type = $type;
44 $rbacreview = $DIC[
'rbacreview'];
45 if ($this->roles === []) {
51 foreach ($this->roles as $role) {
53 if (!empty($this->role_type) && strcasecmp($this->role_type, $role[
"role_type"]) !== 0) {
56 if ($rbacreview->isRoleDeleted($role[
"obj_id"])) {
61 'role_type' => ucwords($role[
"role_type"]),
62 'id' =>
"il_" .
IL_INST_ID .
"_role_" . $role[
"obj_id"]
66 $this->
xmlElement(
'Title', null, $role[
"title"]);
67 $this->
xmlElement(
'Description', null, $role[
"description"]);
73 if (is_object($ownerObj)) {
84 "ref_id" => $ownerObj->getRefId(),
85 "type" => $ownerObj->getType()
88 $this->
xmlElement(
'Title', null, $ownerObj->getTitle());
89 $this->
xmlElement(
'Description', null, $ownerObj->getDescription());
107 $this->
xmlSetDtdDef(
"<!DOCTYPE Roles PUBLIC \"-//ILIAS//DTD ILIAS Roles//EN\" \"" . ILIAS_HTTP_PATH .
"/components/ILIAS/Export/xml/ilias_role_object_3_10.dtd\">");
108 $this->
xmlSetGenCmt(
"Roles information of ilias system");
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlEndTag(string $tag)
Writes an endtag.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
static _getTranslation(string $a_role_title)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
xmlHeader()
Writes xml header.
__construct(Container $dic, ilPlugin $plugin)
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
XML writer class Class to simplify manual writing of xml documents.
xmlDumpMem(bool $format=true)
Returns xml document from memory.
static appendPathToObject(ilXmlWriter $writer, int $refid)
static __extractRefId(string $role_title)
extract ref id from role title, e.g.