5 include_once
'./Services/WebServices/ECS/interfaces/interface.ilECSCommandQueueHandler.php';
44 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
45 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
46 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
51 $res = $dir_reader->getDirectoryTree($a_content_id);
52 $nodes =
$res->getResult();
56 $GLOBALS[
'ilLog']->write(__METHOD__.
': Tree creation failed with mesage ' . $e->getMessage());
63 $data->setMid($this->mid);
64 $data->setCmsId($cms_tree->rootID);
65 $data->setTreeId($a_content_id);
66 $data->setTitle($cms_tree->directoryTreeTitle);
67 $data->setTerm($cms_tree->term);
71 $tree->insertRootNode($a_content_id,
$data->getObjId());
72 $tree->setRootId(
$data->getObjId());
75 foreach((array) $cms_tree->nodes as $node)
80 $data->setMid($this->mid);
81 $data->setCmsId($node->id);
82 $data->setTreeId($a_content_id);
83 $data->setTitle($node->title);
84 $data->setTerm($node->term);
94 (
int) $node->parent->id
96 $tree->insertNode(
$data->getObjId(), $parent_id);
109 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
112 $data->setMid($this->mid);
113 $data->setTreeId($a_content_id);
116 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
120 include_once
'./Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
145 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
147 $res = $dir_reader->getDirectoryTree($a_content_id);
148 $nodes =
$res->getResult();
152 $GLOBALS[
'ilLog']->write(__METHOD__.
': Tree creation failed with mesage ' . $e->getMessage());
157 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
162 $old_nodes = array();
163 if($root_node[
'child'])
165 $old_nodes = $tree->getSubTree($root_node,
true);
174 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
194 $data->setMid($this->mid);
195 $data->setCmsId($cms_tree->rootID);
196 $data->setTreeId($a_content_id);
197 $data->setTitle($cms_tree->directoryTreeTitle);
198 $data->setTerm($cms_tree->term);
202 $data->setDeleted(
false);
210 $tree->insertRootNode($a_content_id,
$data->getObjId());
211 $tree->setRootId(
$data->getObjId());
214 foreach((array) $cms_tree->nodes as $node)
225 $data->setTitle($node->title);
226 $data->setTerm($node->term);
227 $data->setDeleted(
false);
235 $data->setCmsId($node->id);
236 $data->setMid($this->mid);
238 $data->setTreeId($a_content_id);
239 $data->setDeleted(
false);
242 $data_obj_id =
$data->getObjId();
250 (
int) $node->parent->id
252 $tree->insertNode(
$data->getObjId(), $parent_id);
262 foreach((array) $deleted as $obj_id)
265 foreach((array) $old_nodes as $tmp_id => $node)
268 if($node[
'child'] == $obj_id)
270 $parent = $node[
'parent'];
275 if($tree->isInTree($parent) and $parent)
277 $tree->insertNode($obj_id, $parent);
282 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTreeSynchronizer.php';
298 include_once
'./Services/WebServices/ECS/classes/class.ilECSParticipantSettings.php';