public function _createContent(&$toReturn) { if (!CopixPluginRegistry::isRegistered('themechooser|themechooser')) { $toReturn = ""; return true; } $tpl = new CopixTpl(); $arThemes = CopixPluginRegistry::getConfig('themechooser|themechooser')->getThemeList(); $arThemesToReturn = array(); foreach ($arThemes as $theme) { $arThemesToReturn[] = CopixTpl::getThemeInformations($theme); } $selectedTheme = CopixSession::get('themechooser|theme'); $tpl->assign('selectedTheme', $selectedTheme); $tpl->assign('arThemes', $arThemesToReturn); $toReturn = $tpl->fetch('combo.list.tpl'); return true; }
/** * Définition du thème à utiliser */ public function processDoSelectTheme() { CopixSession::set('themechooser|theme', CopixRequest::getInArray('id_ctpt', CopixPluginRegistry::getConfig('themechooser|themechooser', true)->getThemeList(), true)); return _arRedirect(_url()); }