web/lib/Zend/View/Helper/Navigation.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_View
    16  * @package    Zend_View
    17  * @subpackage Helper
    17  * @subpackage Helper
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: Navigation.php 20096 2010-01-06 02:05:09Z bkarwin $
    20  * @version    $Id: Navigation.php 25024 2012-07-30 15:08:15Z rob $
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    24  * @see Zend_View_Helper_Navigation_HelperAbstract
    24  * @see Zend_View_Helper_Navigation_HelperAbstract
    25  */
    25  */
    29  * Proxy helper for retrieving navigational helpers and forwarding calls
    29  * Proxy helper for retrieving navigational helpers and forwarding calls
    30  *
    30  *
    31  * @category   Zend
    31  * @category   Zend
    32  * @package    Zend_View
    32  * @package    Zend_View
    33  * @subpackage Helper
    33  * @subpackage Helper
    34  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    34  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    35  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    36  */
    36  */
    37 class Zend_View_Helper_Navigation
    37 class Zend_View_Helper_Navigation
    38     extends Zend_View_Helper_Navigation_HelperAbstract
    38     extends Zend_View_Helper_Navigation_HelperAbstract
    39 {
    39 {
   155         if (isset($this->_helpers[$proxy])) {
   155         if (isset($this->_helpers[$proxy])) {
   156             return $this->_helpers[$proxy];
   156             return $this->_helpers[$proxy];
   157         }
   157         }
   158 
   158 
   159         if (!$this->view->getPluginLoader('helper')->getPaths(self::NS)) {
   159         if (!$this->view->getPluginLoader('helper')->getPaths(self::NS)) {
       
   160             // Add navigation helper path at the beginning
       
   161             $paths = $this->view->getHelperPaths();
       
   162             $this->view->setHelperPath(null);
       
   163             
   160             $this->view->addHelperPath(
   164             $this->view->addHelperPath(
   161                     str_replace('_', '/', self::NS),
   165                     str_replace('_', '/', self::NS),
   162                     self::NS);
   166                     self::NS);
       
   167             
       
   168             foreach ($paths as $ns => $path) {
       
   169                 $this->view->addHelperPath($path, $ns);
       
   170             }
   163         }
   171         }
   164 
   172 
   165         if ($strict) {
   173         if ($strict) {
   166             $helper = $this->view->getHelper($proxy);
   174             $helper = $this->view->getHelper($proxy);
   167         } else {
   175         } else {