35 $GLOBALS[
'ilLog']->write(__METHOD__.
': Begin read');
38 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSDirectoryTreeConnector.php';
42 $trees = $dir_reader->getDirectoryTrees();
43 $GLOBALS[
'ilLog']->write(__METHOD__.
' '.print_r($trees,
true));
46 foreach((array) $trees->getLinkIds() as $tree_id)
48 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
49 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
53 $result = $dir_reader->getDirectoryTree($tree_id);
67 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
68 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
76 $data->setServerId($this->server_id);
77 $data->setMid($this->mid);
78 $data->setCmsId($cms_tree->rootID);
79 $data->setTreeId($tree_id);
80 $data->setTitle($node->directoryTitle);
81 $data->setTerm($node->term);
84 $tree->insertRootNode($tree_id, $data->getObjId());
85 $tree->setRootId($data->getObjId());
88 foreach((array) $cms_tree->nodes as $node)
92 $data->setServerId($this->server_id);
93 $data->setMid($this->mid);
94 $data->setCmsId($node->id);
95 $data->setTreeId($tree_id);
96 $data->setTitle($node->title);
97 $data->setTerm($node->term);
101 if($node->parent->id)
107 (
int) $node->parent->id
109 $tree->insertNode($data->getObjId(), $parent_id);