import v1.1.0_RC2 | 2009-09-20
This commit is contained in:
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Breadcrumbs.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +31,7 @@ require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_View_Helper_Navigation_Breadcrumbs
|
||||
@ -321,4 +322,4 @@ class Zend_View_Helper_Navigation_Breadcrumbs
|
||||
return $this->renderStraight($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Helper.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,7 +26,7 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
interface Zend_View_Helper_Navigation_Helper
|
||||
@ -208,4 +209,4 @@ interface Zend_View_Helper_Navigation_Helper
|
||||
* @throws Zend_View_Exception if unable to render
|
||||
*/
|
||||
public function render(Zend_Navigation_Container $container = null);
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: HelperAbstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -35,7 +36,7 @@ require_once 'Zend/View/Helper/HtmlElement.php';
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_View_Helper_Navigation_HelperAbstract
|
||||
@ -847,4 +848,4 @@ abstract class Zend_View_Helper_Navigation_HelperAbstract
|
||||
'$role must be null|string|Zend_Acl_Role_Interface');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Links.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +31,7 @@ require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_View_Helper_Navigation_Links
|
||||
@ -775,4 +776,4 @@ class Zend_View_Helper_Navigation_Links
|
||||
// return output (trim last newline by spec)
|
||||
return strlen($output) ? rtrim($output, self::EOL) : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Menu.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +31,7 @@ require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_View_Helper_Navigation_Menu
|
||||
@ -313,32 +314,33 @@ class Zend_View_Helper_Navigation_Menu
|
||||
$minDepth,
|
||||
$maxDepth)
|
||||
{
|
||||
if (!$found = $this->findActive($container, $minDepth, $maxDepth)) {
|
||||
if (!$active = $this->findActive($container, $minDepth - 1, $maxDepth)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$foundPage = $found['page'];
|
||||
$foundDepth = $found['depth'];
|
||||
|
||||
// render children or siblings?
|
||||
if (!$foundPage->hasPages()) {
|
||||
// special case if active page is one below minDepth
|
||||
if ($active['depth'] < $minDepth) {
|
||||
if (!$active['page']->hasPages()) {
|
||||
return '';
|
||||
}
|
||||
} else if (!$active['page']->hasPages()) {
|
||||
// found pages has no children; render siblings
|
||||
$foundPage = $foundPage->getParent();
|
||||
} else if (is_int($maxDepth) && $foundDepth +1 > $maxDepth) {
|
||||
$active['page'] = $active['page']->getParent();
|
||||
} else if (is_int($maxDepth) && $active['depth'] +1 > $maxDepth) {
|
||||
// children are below max depth; render siblings
|
||||
$foundPage = $foundPage->getParent();
|
||||
$active['page'] = $active['page']->getParent();
|
||||
}
|
||||
|
||||
$ulClass = $ulClass ? ' class="' . $ulClass . '"' : '';
|
||||
$html = $indent . '<ul' . $ulClass . '>' . self::EOL;
|
||||
|
||||
foreach ($foundPage as $page) {
|
||||
if (!$this->accept($page)) {
|
||||
foreach ($active['page'] as $subPage) {
|
||||
if (!$this->accept($subPage)) {
|
||||
continue;
|
||||
}
|
||||
$liClass = $page->isActive(true) ? ' class="active"' : '';
|
||||
$liClass = $subPage->isActive(true) ? ' class="active"' : '';
|
||||
$html .= $indent . ' <li' . $liClass . '>' . self::EOL;
|
||||
$html .= $indent . ' ' . $this->htmlify($page) . self::EOL;
|
||||
$html .= $indent . ' ' . $this->htmlify($subPage) . self::EOL;
|
||||
$html .= $indent . ' </li>' . self::EOL;
|
||||
}
|
||||
|
||||
@ -636,4 +638,4 @@ class Zend_View_Helper_Navigation_Menu
|
||||
return $this->renderMenu($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,9 @@
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Sitemap.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -32,7 +33,7 @@ require_once 'Zend/View/Helper/Navigation/HelperAbstract.php';
|
||||
* @category Zend
|
||||
* @package Zend_View
|
||||
* @subpackage Helper
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_View_Helper_Navigation_Sitemap
|
||||
@ -466,4 +467,4 @@ class Zend_View_Helper_Navigation_Sitemap
|
||||
|
||||
return rtrim($xml, PHP_EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user