public function toZend(array $data, Site $site) { $sitePage = $site->getPages()->get($data['id']); if (!$sitePage) { // Handle an invalid page. $fallback = new Fallback('page'); $fallback->setServiceLocator($this->getServiceLocator()); return $fallback->toZend($data, $site); } return ['label' => $data['label'], 'route' => 'site/page', 'params' => ['site-slug' => $site->getSlug(), 'page-slug' => $sitePage->getSlug()]]; }
public function toZend(array $data, Site $site) { parse_str($data['query'], $query); return ['label' => $data['label'], 'route' => 'site/resource', 'params' => ['site-slug' => $site->getSlug(), 'controller' => 'item', 'action' => 'browse'], 'query' => $query]; }
/** * {@inheritDoc} */ public function getResourceId() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResourceId', array()); return parent::getResourceId(); }