$name = 'theme_mmcmonkwearmouth/teacher_buttons'; $title = get_string('teacherbuttons', 'theme_mmcmonkwearmouth'); $description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth'); $setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); $name = 'theme_mmcmonkwearmouth/student_buttons'; $title = get_string('studentbuttons', 'theme_mmcmonkwearmouth'); $description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth'); $setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); $name = 'theme_mmcmonkwearmouth/staff_buttons'; $title = get_string('staffbuttons', 'theme_mmcmonkwearmouth'); $description = get_string('settingbuttonsdesc', 'theme_mmcmonkwearmouth'); $setting = new theme_mmcmonkwearmouth_admin_setting_buttons($name, $title, $description, 0); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); $name = 'theme_mmcmonkwearmouth/logo'; $title = get_string('logo', 'theme_mmcmonkwearmouth'); $description = get_string('logodesc', 'theme_mmcmonkwearmouth'); $setting = new admin_setting_configstoredfile($name, $title, $description, 'logo'); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); $name = 'theme_mmcmonkwearmouth/customcss'; $title = get_string('customcss', 'theme_mmcmonkwearmouth'); $description = get_string('customcssdesc', 'theme_mmcmonkwearmouth'); $default = ''; $setting = new admin_setting_configtextarea($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting);
public function add_numbered_textareas($setting, $count, $default = '') { for ($i = 1; $i <= $count; $i++) { $textarea = new admin_setting_configtextarea($this->name_for($setting, $i), $this->title_for($setting, $i), $this->description_for($setting), $default); $textarea->set_updatedcallback('theme_reset_all_caches'); $this->settingspage->add($textarea); } }