Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated for Zend Framework v1.11.0

  • Loading branch information...
commit 8aa66f46f0440e5a96e0c5c93e2c0437caac6a3d 1 parent 66bebe0
@balupton balupton authored
View
2  Makefile
@@ -31,4 +31,4 @@ add:
git add .gitignore .htaccess * ;
deploy:
- git checkout v1.0; git merge dev; git checkout master; git merge v1.0; git checkout dev; git push --all; git push beanstalk --all;
+ git checkout v1.0; git merge dev; git checkout master; git merge v1.0; git checkout dev; git push --all; git push beanstalk --all; git push springloops --all;
View
82 lib/Zend/View/Helper/Navigation/Menu.php
@@ -64,6 +64,13 @@ class Zend_View_Helper_Navigation_Menu
* @var string|array
*/
protected $_partial = null;
+
+ /**
+ * Simple template to use in the htmlify process if specified
+ *
+ * @var string
+ */
+ protected $_template = null;
/**
* View helper entry point:
@@ -195,32 +202,25 @@ public function getPartial()
return $this->_partial;
}
- // Public methods:
-
- /**
- * Simple template to use in the htmlify process if specified
- *
- * @var string
- */
- protected $_template = null;
-
- /**
- * Set a simple template to use in the htmlify process
- * @param string $template
- * @return $this
- */
- public function setTemplate ( $template ) {
- $this->_template = $template;
- return $this;
- }
+ /**
+ * Set a simple template to use in the htmlify process
+ * @param string $template
+ * @return $this
+ */
+ public function setTemplate ( $template ) {
+ $this->_template = $template;
+ return $this;
+ }
+
+ /**
+ * Get the simple template to use in the htmlify process if specified
+ * @return string
+ */
+ public function getTemplate ( ) {
+ return $this->_template;
+ }
- /**
- * Get the simple template to use in the htmlify process if specified
- * @return string
- */
- public function getTemplate ( ) {
- return $this->_template;
- }
+ // Public methods:
/**
* Returns an HTML string containing an 'a' element for the given page if
@@ -262,22 +262,21 @@ public function htmlify(Zend_Navigation_Page $page)
} else {
$element = 'span';
}
-
- // put together
- $template = $this->getTemplate();
- if ( !$template ) {
- $renderedTemplate = $this->view->escape($label);
- } else {
- $renderedTemplate = populate($template,
- array(
- 'label' => $this->view->escape($label),
- 'title' => $this->view->escape($title),
- 'Page' => $page
- )
- );
- }
-
- // return
+
+ // generate result (with or without template)
+ $template = $this->getTemplate();
+ if ( !$template ) {
+ $renderedTemplate = $this->view->escape($label);
+ } else {
+ $renderedTemplate = populate($template,
+ array(
+ 'label' => $this->view->escape($label),
+ 'title' => $this->view->escape($title),
+ 'Page' => $page
+ )
+ );
+ }
+
return '<' . $element . $this->_htmlAttribs($attribs) . '>'
. $renderedTemplate
. '</' . $element . '>';
@@ -685,4 +684,3 @@ public function render(Zend_Navigation_Container $container = null)
}
}
}
-
View
6 lib/core/functions/_arrays.funcs.php
@@ -428,7 +428,11 @@ function delver_array ( $holder, $array ) {
* @param mixed $holder
* @param mixed $keys
* @param mixed $default
- * @return mixed
+ * @return mixed
+ * @package balphp
+ * @author Benjamin "balupton" Lupton <contact@balupton.com> - {@link http://www.balupton.com/}
+ * @copyright Copyright (c) 2009-2010, Benjamin Arthur Lupton - {@link http://www.balupton.com/}
+ * @license http://www.gnu.org/licenses/agpl.html GNU Affero General Public License
*/
function delve ( $holder, $keys, $default = null) {
# Prepare
Please sign in to comment.
Something went wrong with that request. Please try again.