getElement(); $elementId = $element->getId(); $treeOptions = $element->getTreeViewOptions(); $scriptOptions = $element->getScriptOptions(); /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); $doc->addScript('js/jquery.treeview.js'); $doc->addCriticalStylesheet('css/thirdpart/jquery.treeview.css'); $doc->addInitFunction('$("' . $this->getDomContainerSelector() . '").treeview', [$treeOptions]); $doc->addCriticalStylesheet('css/modules/form-element-checkboxTree.css'); $doc->addScript('js/lib/form-element-checkboxTree.js'); $scriptOptions['elementId'] = $elementId; $doc->addInitObject('ElementCheckboxTree', [$scriptOptions]); return $this; } public function render($content) { return $content; } public function setDomContainerSelector($domContainerSelector) { $this->_domContainerSelector = $domContainerSelector; return $this; } public function getDomContainerSelector() { if (null === $this->_domContainerSelector) { $this->_domContainerSelector = '#' . htmlspecialchars($this->getElement()->getId() . '-tree'); } return $this->_domContainerSelector; } }