_element, $name); $view = Front::getInstance()->getBootstrap()->getResource('view'); $translate = $this->getTranslate(); $this->setBodyCode( ""); } /** * * get categories table service * * @return \Ppb\Service\Table\Relational\Categories */ public function getCategories() { if (!$this->_categories instanceof CategoriesService) { $this->setCategories( new CategoriesService() ); } return $this->_categories; } /** * * set categories table service * * @param \Ppb\Service\Table\Relational\Categories $categories * * @return \Ppb\Form\Element\Category */ public function setCategories(CategoriesService $categories) { $this->_categories = $categories; return $this; } /** * * set refresh flag * * @param boolean $refresh * * @return $this */ public function setRefresh($refresh) { $this->_refresh = $refresh; return $this; } /** * * get refresh flag * * @return boolean */ public function getRefresh() { return $this->_refresh; } /** * * render the form element * * @return string */ public function render() { $output = null; $translate = $this->getTranslate(); $value = (string)$this->getValue(); $categoryName = $this->getCategories()->getFullName($value); // this is already translated $this->removeAttribute('class'); $output = $this->getPrefix() . ' ' . '_endTag . ' ' . '' . $this->getSuffix() . '
'; return $output; } }