/** * Sets a title view to the response * @return null */ public function indexAction() { $parent = $this->getParent(); $depth = $this->getDepth(); $node = $this->properties->getNode(); if ($parent) { try { $parentNode = $this->cms->getNode($node->getRootNodeId(), $node->getRevision(), $parent, null, true, $depth); } catch (NodeNotFoundException $exception) { $this->getLog()->logException($exception); return; } $items = $parentNode->getChildren(); } else { $parentNode = null; $items = array(); $nodeIds = $this->getNodeIds(); foreach ($nodeIds as $nodeId) { try { $items[$nodeId] = $this->cms->getNode($node->getRootNodeId(), $node->getRevision(), $nodeId, null, true, $depth); } catch (NodeNotFoundException $exception) { $this->getLog()->logException($exception); return; } } } $this->setTemplateView($this->getTemplate(static::TEMPLATE_NAMESPACE . '/default'), array('title' => $this->getTitle($parentNode), 'depth' => $depth, 'nodeTypes' => $this->cms->getNodeTypes(), 'parent' => $parentNode, 'items' => $items)); }