public function add_htmleditor($setting, $default = '')
 {
     $htmleditor = new admin_setting_confightmleditor($this->name_for($setting), $this->title_for($setting), $this->description_for($setting), $default);
     $htmleditor->set_updatedcallback('theme_reset_all_caches');
     $this->settingspage->add($htmleditor);
 }
示例#2
0
$temp->add($setting);
// Show MyCourses dropdown in custommenu.
$name = 'theme_lambda/mycourses_dropdown';
$title = get_string('mycourses_dropdown', 'theme_lambda');
$description = get_string('mycourses_dropdown_desc', 'theme_lambda');
$default = false;
$setting = new admin_setting_configcheckbox($name, $title, $description, $default, true, false);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Footnote setting.
$name = 'theme_lambda/footnote';
$title = get_string('footnote', 'theme_lambda');
$description = get_string('footnotedesc', 'theme_lambda');
$default = '';
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Custom CSS file.
$name = 'theme_lambda/customcss';
$title = get_string('customcss', 'theme_lambda');
$description = get_string('customcssdesc', 'theme_lambda');
$default = '';
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$ADMIN->add('theme_lambda', $temp);
// "settings background" settingpage
$temp = new admin_settingpage('theme_lambda_background', get_string('settings_background', 'theme_lambda'));
// list with provides backgrounds
$name = 'theme_lambda/list_bg';
$title = get_string('list_bg', 'theme_lambda');
 public function add_htmleditors($setting, $default = '', $instance)
 {
     $htmleditor = new admin_setting_confightmleditor($this->name_for($setting . $instance), $this->title_for($setting, $instance), $this->description_for($setting), $default);
     $htmleditor->set_updatedcallback('theme_reset_all_caches');
     return $htmleditor;
 }