Category Import Parser.  
 More...
Category Import Parser. 
- Author
 - Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de 
 
Definition at line 23 of file class.ilCategoryImportParser.php.
 
◆ buildTag()
      
        
          | ilCategoryImportParser::buildTag  | 
          ( | 
          string  | 
          $type,  | 
        
        
           | 
           | 
          string  | 
          $name,  | 
        
        
           | 
           | 
          array  | 
          $attr = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 73 of file class.ilCategoryImportParser.php.
   80         if ($type === 
"end") {
    86         if (is_array($attr)) {
    87             foreach ($attr as $k => $v) {
    88                 $tag .= 
" " . $k . 
"=\"$v\"";
  
 
 
◆ handlerBeginTag()
      
        
          | ilCategoryImportParser::handlerBeginTag  | 
          ( | 
            | 
          $a_xml_parser,  | 
        
        
           | 
           | 
          string  | 
          $a_name,  | 
        
        
           | 
           | 
          array  | 
          $a_attribs  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Parameters
 - 
  
    | XMLParser | resource | $a_xml_parser |  | 
    | string | $a_name |  | 
    | array | $a_attribs |  | 
  
   
- Returns
 - void 
 
Definition at line 103 of file class.ilCategoryImportParser.php.
References ilContainerBaseXmlParser\trimAndStripAttribs().
  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"];
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
trimAndStripAttribs(array $attribs)
 
 
 
 
◆ handlerCharacterData()
      
        
          | ilCategoryImportParser::handlerCharacterData  | 
          ( | 
            | 
          $a_xml_parser,  | 
        
        
           | 
           | 
          string  | 
          $a_data  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Parameters
 - 
  
    | XMLParser | resource | $a_xml_parser |  | 
    | string | $a_data |  | 
  
   
- Returns
 - void 
 
Definition at line 172 of file class.ilCategoryImportParser.php.
  178         $a_data = str_replace([
"<", 
">"], [
"<", 
">"], $a_data);
   181         $a_data = preg_replace(
"/\n/", 
"", $a_data);
   182         $a_data = preg_replace(
"/\t+/", 
"", $a_data);
   183         if (!empty($a_data)) {
   184             $this->cdata .= $a_data;
  
 
 
◆ handlerEndTag()
      
        
          | ilCategoryImportParser::handlerEndTag  | 
          ( | 
            | 
          $a_xml_parser,  | 
        
        
           | 
           | 
          string  | 
          $a_name  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Parameters
 - 
  
    | XMLParser | resource | $a_xml_parser |  | 
    | string | $a_name |  | 
  
   
- Returns
 - void 
 
Definition at line 130 of file class.ilCategoryImportParser.php.
References $cdata, and ilContainerBaseXmlParser\trimAndStrip().
  135                 unset($this->category, $this->parent[$this->parent_cnt - 1]);
   141                 if ($this->cur_spec_lang === $this->default_language) {
   142                     $this->category->setTitle($this->cur_title);
   143                     $this->category->setDescription($this->cur_description);
   144                     $this->category->update();
   147                 $this->category->addTranslation(
   149                     $this->cur_description,
   150                     $this->cur_spec_lang,
 
trimAndStrip(string $input)
 
 
 
 
◆ setHandlers()
      
        
          | ilCategoryImportParser::setHandlers  | 
          ( | 
            | 
          $a_xml_parser | ) | 
           | 
        
      
 
Definition at line 65 of file class.ilCategoryImportParser.php.
   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');
  
 
 
◆ $cat_log
  
  
      
        
          | ilLogger ilCategoryImportParser::$cat_log | 
         
       
   | 
  
protected   | 
  
 
 
◆ $category
◆ $cdata
  
  
      
        
          | string ilCategoryImportParser::$cdata = "" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $cur_description
  
  
      
        
          | string ilCategoryImportParser::$cur_description = "" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $cur_spec_lang
  
  
      
        
          | string ilCategoryImportParser::$cur_spec_lang = "" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $cur_title
  
  
      
        
          | string ilCategoryImportParser::$cur_title = "" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $default_language
  
  
      
        
          | string ilCategoryImportParser::$default_language = "" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $parent
      
        
          | array ilCategoryImportParser::$parent | 
        
      
 
 
◆ $parent_cnt
      
        
          | int ilCategoryImportParser::$parent_cnt | 
        
      
 
 
◆ $rbacadmin
◆ $rbacreview
◆ $rbacsystem
◆ $withrol
      
        
          | int ilCategoryImportParser::$withrol | 
        
      
 
 
The documentation for this class was generated from the following file: