24require_once(
"./Services/Xml/classes/class.ilSaxParser.php");
25require_once(
'./Services/User/classes/class.ilObjUser.php');
26include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
60 parent::__construct(
null);
63 $this->parent_id = $a_parent_id;
93 xml_set_object($a_xml_parser,$this);
94 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
95 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
103 parent::startParsing();
107 return is_object($this->cat) ? $this->cat->getRefId() :
false;
111 return is_object($this->cat) ? $this->cat->update() :
false;
133 $this->current_translation = array();
134 $this->current_translation[
'default'] = $a_attribs[
'default'] ? 1 : 0;
135 $this->current_translation[
'lang'] = $a_attribs[
'language'];
140 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
144 case 'ContainerSetting':
145 $this->current_container_setting = $a_attribs[
'id'];
165 $this->current_translation[
'title'] = trim($this->cdata);
167 if($this->current_translation[
'default'])
169 $this->
getCategory()->setTitle(trim($this->cdata));
175 $this->current_translation[
'description'] = trim($this->cdata);
177 if($this->current_translation[
'default'])
179 $this->
getCategory()->setDescription(trim($this->cdata));
187 (
string) $this->current_translation[
'title'],
188 (
string) $this->current_translation[
'description'],
189 (
string) $this->current_translation[
'lang'],
190 (
int) $this->current_translation[
'default']
194 case 'ContainerSetting':
195 if($this->current_container_setting)
199 $this->current_container_setting,
213 #$a_data = str_replace("<","<",$a_data);
214 #$a_data = str_replace(">",">",$a_data);
218 $this->cdata .= $a_data;
getParentId()
Get parent id.
$current_container_setting
setCategory($cat)
Set category object.
handlerEndTag($a_xml_parser, $a_name)
Handler end tag.
__construct($a_xml, $a_parent_id)
Constructor.
setMode($mode)
Set import mode.
getCurrentTranslation()
Get current translation.
startParsing()
start the parser
save()
Save category object.
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class @access private
static _importContainerSortingSettings($attibs, $obj_id)
sorting import for all container objects
_writeContainerSetting($a_id, $a_keyword, $a_value)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
setXMLContent($a_xml_content)