/** * Gets list of themes folder from themes directory, excluding any directories that do not have theme.html * @deprecated Use icms_view_theme_Factory::getThemesList() * @todo Remove in 1.4 * @return array */ public static function getThemesList() { icms_core_Debug::setDeprecated('icms_module_Handler::getAvailable', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); return icms_view_theme_Factory::getThemesList(); }
/** * Constructor * * @param string $caption * @param string $name * @param mixed $value Pre-selected value (or array of them). * @param int $size Number or rows. "1" makes a drop-down-list */ public function __construct($caption, $name, $value = null, $size = 1) { parent::__construct($caption, $name, $value, $size); $this->addOptionArray(icms_view_theme_Factory::getThemesList()); }
$ele->addOption($optval, $optkey); } break; case 'yesno' : $ele = new icms_form_elements_Radioyn($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO); break; case 'theme' : case 'theme_multi' : case 'theme_admin' : $ele =($config[$i]->getVar('conf_formtype') != 'theme_multi') ? new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, TRUE); $dirlist =($config[$i]->getVar('conf_formtype') != 'theme_admin') ? icms_view_theme_Factory::getThemesList() : icms_view_theme_Factory::getAdminThemesList(); if (! empty($dirlist)) { asort($dirlist); $ele->addOptionArray($dirlist); } $form->addElement(new icms_form_elements_Hidden('_old_theme', $config[$i]->getConfValueForOutput())); break; case 'editor' : case 'editor_source' : $type = explode('_', $config[$i]->getVar('conf_formtype')); $ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); $type = array_pop($type); if ($type == 'editor') $type = ''; $dirlist = icms_plugins_EditorHandler::getListByType($type);
$options = $config_handler->getConfigOptions(new icms_db_criteria_Item('conf_id', $config[$i]->getVar('conf_id'))); $opcount = count($options); for ($j = 0; $j < $opcount; $j++) { $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); $ele->addOption($optval, $optkey); } break; case 'yesno': $ele = new icms_form_elements_Radioyn($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO); break; case 'theme': case 'theme_multi': case 'theme_admin': $ele = $config[$i]->getVar('conf_formtype') != 'theme_multi' ? new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, TRUE); $dirlist = $config[$i]->getVar('conf_formtype') != 'theme_admin' ? icms_view_theme_Factory::getThemesList() : icms_view_theme_Factory::getAdminThemesList(); if (!empty($dirlist)) { asort($dirlist); $ele->addOptionArray($dirlist); } $form->addElement(new icms_form_elements_Hidden('_old_theme', $config[$i]->getConfValueForOutput())); break; case 'editor': case 'editor_source': $type = explode('_', $config[$i]->getVar('conf_formtype')); $ele = new icms_form_elements_Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); $type = array_pop($type); if ($type == 'editor') { $type = ''; } $dirlist = icms_plugins_EditorHandler::getListByType($type);