/** * @param string $method * @param array $arguments * @return mixed */ public function __call($method, array $arguments = array()) { $return = parent::__call($method, $arguments); // disable the translator per default, because this isn't necessary for pimcore if (is_object($return) && method_exists($return, "setUseTranslator")) { $return->setUseTranslator(false); } return $return; }
/** * @group ZF-6854 */ public function testRenderInvisibleItem() { $container = new Zend_Navigation(array(array('label' => 'Page 1', 'id' => 'p1', 'uri' => 'p1'), array('label' => 'Page 2', 'id' => 'p2', 'uri' => 'p2', 'visible' => false))); $render = $this->_helper->menu()->render($container); $this->assertFalse(strpos($render, 'p2')); $this->_helper->menu()->setRenderInvisible(); $render = $this->_helper->menu()->render($container); $this->assertTrue(strpos($render, 'p2') !== false); }
public function getContainer() { if (null === $this->_container) { if (!Zend_Registry::isRegistered('Zend_Navigation')) { $this->_container = new Zend_Navigation(Centurion_Db::getSingleton('core/navigation')->getCache()->toNavigation()); } } return parent::getContainer(); }
/** * Returns the helper matching $proxy * * The helper must implement the interface * {@link Zend_View_Helper_Navigation_Helper}. * * @param string $proxy helper name * @param bool $strict [optional] whether * exceptions should be * thrown if something goes * wrong. Default is true. * @return Zend_View_Helper_Navigation_Helper helper instance * @throws Zend_Loader_PluginLoader_Exception if $strict is true and * helper cannot be found * @throws Zend_View_Exception if $strict is true and * helper does not implement * the specified interface */ public function findHelper($proxy, $strict = true) { if (isset($this->_helpers[$proxy])) { return $this->_helpers[$proxy]; } if (!$this->view->getPluginLoader('helper')->getPaths(parent::NS)) { $this->view->addHelperPath( str_replace('_', '/', parent::NS), parent::NS); } if (!$this->view->getPluginLoader('helper')->getPaths(self::NS)) { $this->view->addHelperPath( str_replace('_', '/', self::NS), self::NS); } return parent::findHelper($proxy, $strict); }