_initRender(); return $content; } protected function _initRender() { /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); $doc->addScript('js/lib/form-element-timeRanges.js'); $doc->addInitObject('form.element.TimeRanges', array($this->_getScriptOptions())); return $this; } protected function _getScriptOptions() { /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); /** @var $element Qs_Form_Element_TimeRanges */ $element = $this->getElement(); $attribs = $element->getAttribs(); $attribs['mode'] = Qs_View_Helper_FormTimeRanges::MODE_TEMPLATE; $options = array( 'id' => $element->getId(), 'template' => $doc->getView()->formTimeRanges( $element->getName(), array(\App\Event\Form\AbstractManageForm::$timeDefaults), $attribs ) ); return $options; } }