From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../manual/core/en/migration.112.html | 187 +++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 zend/documentation/manual/core/en/migration.112.html (limited to 'zend/documentation/manual/core/en/migration.112.html') diff --git a/zend/documentation/manual/core/en/migration.112.html b/zend/documentation/manual/core/en/migration.112.html new file mode 100644 index 0000000..e946938 --- /dev/null +++ b/zend/documentation/manual/core/en/migration.112.html @@ -0,0 +1,187 @@ + + + + + Zend Framework 1.12 - Zend Framework Manual + + + + + + + + +
+ + + + + + + + +
+ Zend Gdata Migration Notes + + + + +
+
+

Zend Framework 1.12

+ + +

+ When upgrading from a previous release to Zend Framework 1.12 or higher you + should note the following migration notes. +

+ +

Zend_View_Helper_Navigation

+ + +

+ Prior to the 1.12 release, a helper with the name + "My_View_Helper_Navigation_Menu" can not be used, because the proxy + helper returns always the standard view helper + "Zend_View_Helper_Navigation_Menu". +

+ +

+ Starting from version 1.12, you can use our own navigation helpers + with the name "menu", "breadcrumbs", ... +

+ +

+ Create your own helper with name "Menu": +

+ +
  1. class My_View_Helper_Navigation_Menu
  2. +
  3.     extends Zend_View_Helper_Navigation_HelperAbstract
  4. +
  5. {
  6. +
  7.     public function menu(Zend_Navigation_Container $container = null)
  8. +
  9.     {
  10. +
  11.         if (null !== $container) {
  12. +
  13.             $this->setContainer($container);
  14. +
  15.         }
  16. +
  17.  
  18. +
  19.         return $this;
  20. +
  21.     }
  22. +
  23.  
  24. +
  25.     public function render(Zend_Navigation_Container $container = null)
  26. +
  27.     {
  28. +
  29.         return '<nav>Example</nav>';
  30. +
  31.     }
  32. +
  33. }
+ + +

+ Add the helper path to Zend_View in your + Bootstrap class: +

+ +
  1. protected function _initView()
  2. +
  3.     {
  4. +
  5.         $this->bootstrap('view');
  6. +
  7.         $this->view->addHelperPath(
  8. +
  9.             'path/to/helper',
  10. +
  11.             'My_View_Helper_Navigation'
  12. +
  13.         );
  14. +
  15.     }
+ + +

+ Or add the helper path in your "application.ini" file: +

+ +
  1. resources.view.helperPath.My_View_Helper_Navigation = "path/to/helper"
+ + +

+ The following code is used in a view script: +

+ +
  1. <?php echo $this->navigation()->menu(); ?>
+ + +

+ Output: +

+ +
  1. <nav>Example</nav>
+ +
+
+
+ + + + + + + + + +
+ Zend Gdata Migration Notes + + + + +
+
+ +
+ + \ No newline at end of file -- cgit v1.2.3