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.
18
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19
* @license http://framework.zend.com/license/new-bsd New BSD License
23
require_once 'Zend/Form.php';
31
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
32
* @license http://framework.zend.com/license/new-bsd New BSD License
33
* @version $Id: Form.php 12373 2008-11-07 16:52:44Z matthew $
35
class Zend_Dojo_Form extends Zend_Form
40
* @param array|Zend_Config|null $options
43
public function __construct($options = null)
45
$this->addPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator', 'decorator')
46
->addPrefixPath('Zend_Dojo_Form_Element', 'Zend/Dojo/Form/Element', 'element')
47
->addElementPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator', 'decorator')
48
->addDisplayGroupPrefixPath('Zend_Dojo_Form_Decorator', 'Zend/Dojo/Form/Decorator')
49
->setDefaultDisplayGroupClass('Zend_Dojo_Form_DisplayGroup');
50
parent::__construct($options);
54
* Load the default decorators
58
public function loadDefaultDecorators()
60
if ($this->loadDefaultDecoratorsIsDisabled()) {
64
$decorators = $this->getDecorators();
65
if (empty($decorators)) {
66
$this->addDecorator('FormElements')
67
->addDecorator('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form_dojo'))
68
->addDecorator('DijitForm');
75
* Ensures that the view object has the dojo view helper path set.
77
* @param Zend_View_Interface $view
78
* @return Zend_Dojo_Form_Element_Dijit
80
public function setView(Zend_View_Interface $view = null)
83
if (false === $view->getPluginLoader('helper')->getPaths('Zend_Dojo_View_Helper')) {
84
$view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
87
return parent::setView($view);