19declare(strict_types=1);
57 $this->rbacadmin =
$DIC->rbac()->admin();
58 $this->rbacreview =
$DIC->rbac()->review();
59 $this->rbacsystem =
$DIC->rbac()->system();
60 $this->parent_cnt = 0;
82 if ($type ===
"end") {
88 if (is_array($attr)) {
89 foreach ($attr as $k => $v) {
90 $tag .=
" " . $k .
"=\"$v\"";
105 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
107 $a_attribs = $this->trimAndStripAttribs($a_attribs);
110 $cur_parent = $this->parent[$this->parent_cnt - 1];
112 $this->category->setImportId($a_attribs[
"Id"] .
" (#" . $cur_parent .
")");
113 $this->default_language = $a_attribs[
"DefaultLanguage"];
114 $this->category->setTitle($a_attribs[
"Id"]);
115 $this->category->create();
116 $this->category->createReference();
117 $this->category->putInTree($cur_parent);
118 $this->parent[$this->parent_cnt++] = $this->category->getRefId();
122 $this->cur_spec_lang = $a_attribs[
"Language"];
134 $this->cdata = $this->trimAndStrip($this->cdata);
137 unset($this->category, $this->parent[$this->parent_cnt - 1]);
143 if ($this->cur_spec_lang === $this->default_language) {
144 $this->category->setTitle($this->cur_title);
145 $this->category->setDescription($this->cur_description);
146 $this->category->update();
149 $this->category->addTranslation(
151 $this->cur_description,
152 $this->cur_spec_lang,
158 $this->cur_title = $this->cdata;
162 $this->cur_description = $this->cdata;
180 $a_data = str_replace([
"<",
">"], [
"<",
">"], $a_data);
183 $a_data = preg_replace(
"/\n/",
"", $a_data);
184 $a_data = preg_replace(
"/\t+/",
"", $a_data);
185 if (!empty($a_data)) {
186 $this->cdata .= $a_data;
setHandlers($a_xml_parser)
handlerEndTag($a_xml_parser, string $a_name)
handlerCharacterData($a_xml_parser, string $a_data)
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
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...
Component logger with individual log levels by component id.
Class ilRbacAdmin Core functions for role based access control.
class ilRbacReview Contains Review functions of core Rbac.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
__construct(?string $path_to_file='', ?bool $throw_exception=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc