Created
September 11, 2012 11:09
-
-
Save Hounddog/3697642 to your computer and use it in GitHub Desktop.
NavigationFactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* V5 | |
* LICENSE | |
* | |
* Insert License here | |
* | |
*/ | |
namespace DysAdmin; | |
use DysBase\Module\AbstractModule; | |
use Zend\EventManager\EventInterface; | |
use Zend\Mvc\MvcEvent; | |
/** | |
* Base Module for Site | |
* @category Site | |
* @package Module | |
* @copyright Copyright (c) 2012 Doyousoft | |
* @license $license_information | |
* @version $Id | |
*/ | |
class Module extends AbstractModule | |
{ | |
public function getDoctrineConfig() | |
{ | |
return array(); | |
} | |
public function getDir() | |
{ | |
return __DIR__; | |
} | |
public function getNamespace() | |
{ | |
return __NAMESPACE__; | |
} | |
/** | |
* @{inheritdoc} | |
*/ | |
public function getServiceConfig() | |
{ | |
return array( | |
'factories' => array( | |
'admin_json_navigation' => 'DysAdmin\Navigation\Service\AdminNavigationFactory', | |
), | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace DysAdmin\Navigation\Page; | |
use Zend\Navigation\Page\Mvc; | |
use Zend\Mvc\Router\RouteStackInterface; | |
class Json extends Mvc | |
{ | |
/** | |
* Returns an array representation of the page | |
* | |
* @return array associative array containing all page properties | |
*/ | |
public function toArray() | |
{ | |
return array_merge($this->getCustomProperties(), array( | |
'label' => $this->getLabel(), | |
'id' => $this->getId(), | |
'class' => $this->getClass(), | |
'title' => $this->getTitle(), | |
'target' => $this->getHref(), | |
'order' => $this->getOrder(), | |
'privilege' => $this->getPrivilege(), | |
'active' => $this->isActive(), | |
'visible' => $this->isVisible(), | |
'type' => get_called_class(), | |
'pages' => parent::toArray(), | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment