24 require_once(
"./Services/Xml/classes/class.ilSaxParser.php");
25 require_once(
'./Services/User/classes/class.ilObjUser.php');
26 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
65 parent::__construct(null);
68 $this->parent_id = $a_parent_id;
100 xml_set_object($a_xml_parser,$this);
101 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
102 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
110 parent::startParsing();
114 return is_object($this->cat) ? $this->cat->getRefId() :
false;
118 return is_object($this->cat) ? $this->cat->update() :
false;
140 $this->current_translation =
array();
141 $this->current_translation[
'default'] = $a_attribs[
'default'] ? 1 : 0;
142 $this->current_translation[
'lang'] = $a_attribs[
'language'];
147 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
151 case 'ContainerSetting':
152 $this->current_container_setting = $a_attribs[
'id'];
172 $this->current_translation[
'title'] = trim($this->cdata);
174 if($this->current_translation[
'default'])
176 $this->
getCategory()->setTitle(trim($this->cdata));
182 $this->current_translation[
'description'] = trim($this->cdata);
184 if($this->current_translation[
'default'])
186 $this->
getCategory()->setDescription(trim($this->cdata));
194 (
string) $this->current_translation[
'title'],
195 (
string) $this->current_translation[
'description'],
196 (
string) $this->current_translation[
'lang'],
197 (
int) $this->current_translation[
'default']
201 case 'ContainerSetting':
202 if($this->current_container_setting)
204 $this->cat_log->debug(
"Write container Setting, ID: ".$this->
getCategory()->getId().
", setting: ".
205 $this->current_container_setting.
", data: ".$this->cdata);
208 $this->current_container_setting,
213 case 'ContainerSettings':
214 $this->cat->readContainerSettings();
226 #$a_data = str_replace("<","<",$a_data); 227 #$a_data = str_replace(">",">",$a_data); 231 $this->cdata .= $a_data;
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
startParsing()
start the parser
$current_container_setting
static _importContainerSortingSettings($attibs, $obj_id)
sorting import for all container objects
handlerEndTag($a_xml_parser, $a_name)
Handler end tag.
__construct($a_xml, $a_parent_id)
Constructor.
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
getCurrentTranslation()
Get current translation.
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
setCategory($cat)
Set category object.
save()
Save category object.
Create styles array
The data for the language used.
getParentId()
Get parent id.
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class private
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static getLogger($a_component_id)
Get component logger.
setXMLContent($a_xml_content)
setMode($mode)
Set import mode.