3 declare(strict_types=1);
54 $this->rbacadmin = $DIC->rbac()->admin();
55 $this->rbacreview = $DIC->rbac()->review();
56 $this->rbacsystem = $DIC->rbac()->system();
57 $this->parent_cnt = 0;
67 xml_set_object($a_xml_parser, $this);
68 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
69 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
80 if ($type ===
"end") {
86 if (is_array($attr)) {
87 foreach ($attr as $k => $v) {
88 $tag .=
" " . $k .
"=\"$v\"";
103 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
108 $cur_parent = $this->parent[$this->parent_cnt - 1];
110 $this->category->setImportId($a_attribs[
"Id"] .
" (#" . $cur_parent .
")");
111 $this->default_language = $a_attribs[
"DefaultLanguage"];
112 $this->category->setTitle($a_attribs[
"Id"]);
113 $this->category->create();
114 $this->category->createReference();
115 $this->category->putInTree($cur_parent);
116 $this->parent[$this->parent_cnt++] = $this->category->getRefId();
120 $this->cur_spec_lang = $a_attribs[
"Language"];
136 unset($this->category, $this->parent[$this->parent_cnt - 1]);
142 if ($this->cur_spec_lang === $this->default_language) {
143 $this->category->setTitle($this->cur_title);
144 $this->category->setDescription($this->cur_description);
145 $this->category->update();
148 $this->category->addTranslation(
150 $this->cur_description,
151 $this->cur_spec_lang,
179 $a_data = str_replace([
"<",
">"], [
"<",
">"], $a_data);
182 $a_data = preg_replace(
"/\n/",
"", $a_data);
183 $a_data = preg_replace(
"/\t+/",
"", $a_data);
184 if (!empty($a_data)) {
185 $this->cdata .= $a_data;
handlerCharacterData($a_xml_parser, string $a_data)
setHandlers($a_xml_parser)
buildTag(string $type, string $name, array $attr=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
handlerEndTag($a_xml_parser, string $a_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
trimAndStripAttribs(array $attribs)
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
Class ilRbacAdmin Core functions for role based access control.
__construct(?string $path_to_file='', ?bool $throw_exception=false)
trimAndStrip(string $input)