public function renderFormElement() { $elm = new Zend_Form_Element_Select($this->getName(), array('label' => $this->getLabel() . ':')); $elm->setRequired($this->getRequired()); $tr = new Ot_Layout_ThemeRegister(); $themes = $tr->getThemes(); foreach ($themes as $t) { $elm->addMultiOption($t->getName(), $t->getLabel() . ' - ' . $t->getDescription()); } $elm->setDescription($this->getDescription()); $elm->setValue($this->getValue()); return $elm; }
public function _initRegisterThemes() { $tr = new Ot_Layout_ThemeRegister(); $defaultTheme = new Ot_Layout_Theme('default', 'Default Theme', 'The default theme.', realpath(APPLICATION_PATH . '/../public/themes/ot/default')); $defaultTheme->addCss('themes/ot/default/public/css/layout.css', 'prepend'); $ncsuTheme = new Ot_Layout_Theme('ncsu', 'NC State Theme', 'Theme based on the NC State Homepage', realpath(APPLICATION_PATH . '/../public/themes/ot/ncsu')); $ncsuTheme->addCss('themes/ot/ncsu/public/css/layout.css', 'prepend'); $ncsuTheme->addCss('css/ncsubootstrap/css/ncsu-bootstrap.css', 'prepend'); $ncsuTheme->addJs('themes/ot/ncsu/public/scripts/default.js', 'prepend'); $tr->registerTheme($defaultTheme); $tr->registerTheme($ncsuTheme); }