I've tried using a Dojo button view helper, but it appears that Zend will not automatically generate a dojo.require('dijit.form.Button')
. Is this correct behavior?
Here's excerpt from my layout script:
<head>
<?= $this->dojo()->setDjConfigOption('usePlainJson',true)->addStylesheetModule('dijit.themes.claro')->setLocalPath("/js/dojo/dojo.js"); ?>
</head>
...
<?= $this->button('test', 'test') ?>
And this is in my bootstrap:
public function _initDojo() {
$view = $this->getResource('view');
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
Zend_Dojo::enableView($view);
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
}
All other Dojo-specific code is rendered properly, except the dojo.require
.