protected function fetchNode($id) { $function = 'node.retrieve'; if ($this->DrupalVersion == '5.x') { $function = 'node.load'; } $nodeData = $this->RPC($function, array($id, array())); if ($nodeData) { return DrupalNodeContentItem::factory($this, $nodeData); } }
protected function createContentItem($item) { if (!isset($item['link'])) { return NULL; } $linkData = $item['link']; $menuLinkID = $linkData['mlid']; if (isset($linkData['path']) && strlen($linkData['path']) > 5 && substr($linkData['path'], 0, 5) == 'node/') { $nodeId = substr($linkData['path'], 5); $nodeData = $this->getNode($this->encodeId($nodeId)); return DrupalNodeContentItem::factory($this, array('link' => $linkData, 'node' => $nodeData)); } else { return DrupalMenuLinkContentItem::factory($this, array('link' => $linkData)); } }