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');
72 $this->error = $DIC[
"ilErr"];
73 parent::__construct(null);
76 $this->parent_id = $a_parent_id;
108 xml_set_object($a_xml_parser, $this);
109 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
110 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
118 parent::startParsing();
121 return is_object($this->cat) ? $this->cat->getRefId() :
false;
123 return is_object($this->cat) ? $this->cat->update() :
false;
144 $this->current_translation =
array();
145 $this->current_translation[
'default'] = $a_attribs[
'default'] ? 1 : 0;
146 $this->current_translation[
'lang'] = $a_attribs[
'language'];
151 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
155 case 'ContainerSetting':
156 $this->current_container_setting = $a_attribs[
'id'];
175 $this->current_translation[
'title'] = trim($this->cdata);
177 if ($this->current_translation[
'default']) {
178 $this->
getCategory()->setTitle(trim($this->cdata));
184 $this->current_translation[
'description'] = trim($this->cdata);
186 if ($this->current_translation[
'default']) {
187 $this->
getCategory()->setDescription(trim($this->cdata));
195 (
string) $this->current_translation[
'title'],
196 (
string) $this->current_translation[
'description'],
197 (
string) $this->current_translation[
'lang'],
198 (
int) $this->current_translation[
'default']
202 case 'ContainerSetting':
203 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,
214 case 'ContainerSettings':
215 $this->cat->readContainerSettings();
227 #$a_data = str_replace("<","<",$a_data); 228 #$a_data = str_replace(">",">",$a_data); 230 if (!empty($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.