|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Dojo |
|
17 * @subpackage Form |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 */ |
|
21 |
|
22 /** Zend_Form_DisplayGroup */ |
|
23 require_once 'Zend/Form/DisplayGroup.php'; |
|
24 |
|
25 /** |
|
26 * Dijit-enabled DisplayGroup |
|
27 * |
|
28 * @uses Zend_Form_DisplayGroup |
|
29 * @package Zend_Dojo |
|
30 * @subpackage Form |
|
31 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
33 * @version $Id: DisplayGroup.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
34 */ |
|
35 class Zend_Dojo_Form_DisplayGroup extends Zend_Form_DisplayGroup |
|
36 { |
|
37 /** |
|
38 * Constructor |
|
39 * |
|
40 * @param string $name |
|
41 * @param Zend_Loader_PluginLoader $loader |
|
42 * @param array|Zend_Config|null $options |
|
43 * @return void |
|
44 */ |
|
45 public function __construct($name, Zend_Loader_PluginLoader $loader, $options = null) |
|
46 { |
|
47 parent::__construct($name, $loader, $options); |
|
48 $this->addPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator'); |
|
49 } |
|
50 |
|
51 /** |
|
52 * Set the view object |
|
53 * |
|
54 * Ensures that the view object has the dojo view helper path set. |
|
55 * |
|
56 * @param Zend_View_Interface $view |
|
57 * @return Zend_Dojo_Form_Element_Dijit |
|
58 */ |
|
59 public function setView(Zend_View_Interface $view = null) |
|
60 { |
|
61 if (null !== $view) { |
|
62 if (false === $view->getPluginLoader('helper')->getPaths('Zend_Dojo_View_Helper')) { |
|
63 $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper'); |
|
64 } |
|
65 } |
|
66 return parent::setView($view); |
|
67 } |
|
68 } |