3declare(strict_types=1);
 
   49        $this->
lng = $DIC->language();
 
   50        $this->tree = 
$DIC->repositoryTree();
 
   53        $access_manager = 
$service->domain()->access(0, 
$DIC->user()->getId());
 
   54        $access_manager->enableWrite(
true);
 
   56        $this->color_manager = 
$service->domain()->color(
 
   57            $a_style_obj->
getId(),
 
   61        $this->style_obj = $a_style_obj;
 
   74        xml_set_object($a_xml_parser, $this);
 
   75        xml_set_element_handler($a_xml_parser, 
'handlerBeginTag', 
'handlerEndTag');
 
   76        xml_set_character_data_handler($a_xml_parser, 
'handlerCharacterData');
 
   84        $this->styles = array();
 
   85        parent::startParsing();
 
   86        $this->style_obj->setStyle($this->styles);
 
   87        $this->style_obj->setCharacteristics($this->chars);
 
   98                $this->current_tag = $a_attribs[
"Tag"];
 
   99                $this->current_class = $a_attribs[
"Class"];
 
  100                $this->current_type = $a_attribs[
"Type"];
 
  101                if ($this->current_class == 
"PageTitle" && $this->current_type == 
"page_title" && $this->current_tag == 
"div") {
 
  102                    $this->current_tag = 
"h1";
 
  104                if ($this->current_class == 
"Headline1" && $this->current_tag == 
"div") {
 
  105                    $this->current_tag = 
"h1";
 
  106                    $this->current_type = 
"heading1";
 
  108                if ($this->current_class == 
"Headline2" && $this->current_tag == 
"div") {
 
  109                    $this->current_tag = 
"h2";
 
  110                    $this->current_type = 
"heading2";
 
  112                if ($this->current_class == 
"Headline3" && $this->current_tag == 
"div") {
 
  113                    $this->current_tag = 
"h3";
 
  114                    $this->current_type = 
"heading3";
 
  116                $this->current_tags = array();
 
  117                $this->chars[] = array(
"type" => $this->current_type,
 
  118                    "class" => $this->current_class);
 
  121            case "StyleParameter":
 
  122                $this->current_tags[] = array(
 
  123                    "tag" => $this->current_tag,
 
  124                    "class" => $this->current_class,
 
  125                    "parameter" => $a_attribs[
"Name"],
 
  126                    "type" => $this->current_type,
 
  127                    "value" => $a_attribs[
"Value"],
 
  128                    "custom" => $a_attribs[
"Custom"] ?? 
null);
 
  132                $this->color_manager->addColor($a_attribs[
"Name"], $a_attribs[
"Code"]);
 
  135            case "StyleTemplate":
 
  136                $this->cur_template = array(
"type" => $a_attribs[
"Type"],
 
  137                    "name" => $a_attribs[
"Name"]);
 
  138                $this->cur_template_classes = array();
 
  141            case "StyleTemplateClass":
 
  142                $this->cur_template_classes[$a_attribs[
"ClassType"]] =
 
  154        $this->cdata = $this->trimAndStrip($this->cdata);
 
  157                $this->style_obj->setTitle($this->cdata);
 
  161                $this->style_obj->setDescription($this->cdata);
 
  165                $this->styles[] = $this->current_tags;
 
  168            case "StyleTemplate":
 
  169                $this->style_obj->addTemplate(
 
  170                    $this->cur_template[
"type"],
 
  171                    $this->cur_template[
"name"],
 
  172                    $this->cur_template_classes
 
  187        $a_data = str_replace(
"<", 
"<", $a_data);
 
  188        $a_data = str_replace(
">", 
">", $a_data);
 
  191        $a_data = preg_replace(
"/\n/", 
"", $a_data);
 
  192        $a_data = preg_replace(
"/\t+/", 
"", $a_data);
 
  193        if (!empty($a_data)) {
 
  194            $this->cdata .= $a_data;
 
  201        foreach ($attribs as $k => $v) {
 
  202            $ret[$k] = $this->trimAndStrip((
string) $v);
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
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)
 
ilObjStyleSheet $style_obj
 
trimAndStripAttribs(array $attribs)
 
__construct(string $a_xml_file, ilObjStyleSheet $a_style_obj)
 
handlerCharacterData( $a_xml_parser, string $a_data)
 
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class @access private
 
startParsing()
start the parser
 
array $cur_template_classes
 
handlerBeginTag( $a_xml_parser, string $a_name, array $a_attribs)
 
trimAndStrip(string $input)
 
Content ColorManager $color_manager
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...