/** * Returns an array representation of the page * * @return array associative array containing all page properties */ public function toArray() { return array_merge( parent::toArray(), array( 'action' => $this->getAction(), 'controller' => $this->getController(), 'module' => $this->getModule(), 'params' => $this->getParams(), 'route' => $this->getRoute(), 'reset_params' => $this->getResetParams() )); }
/** * Returns an array representation of the page * * @return array */ public function toArray() { return array_merge(parent::toArray(), array('uri' => $this->getUri())); }
/** * Converts a Zend_Navigation_Page subclass object to a corresponding Omeka object * * @param Zend_Navigation_Page $page The page to convert * @param string $subclassPostfix The postfix of the subclass. Must be 'Uri' or 'Mvc' * @return Omeka_Navigation_Page_Uri|Omeka_Navigation_Page_Mvc The converted page */ protected function _convertZendToOmekaNavigationPage(Zend_Navigation_Page $page, $subclassPostfix) { // change the type of page $fromClass = 'Zend_Navigation_Page_' . $subclassPostfix; $toClass = 'Omeka_Navigation_Page_' . $subclassPostfix; $pageOptions = $this->_conditionalReplaceValueInArray($page->toArray(), 'pages', 'type', $fromClass, $toClass); $convertedPage = new $toClass(); $convertedPage->setOptions($pageOptions); return $convertedPage; }