当前位置: 首页>>代码示例>>PHP>>正文


PHP admin_setting_configcheckbox::set_updatedcallback方法代码示例

本文整理汇总了PHP中admin_setting_configcheckbox::set_updatedcallback方法的典型用法代码示例。如果您正苦于以下问题:PHP admin_setting_configcheckbox::set_updatedcallback方法的具体用法?PHP admin_setting_configcheckbox::set_updatedcallback怎么用?PHP admin_setting_configcheckbox::set_updatedcallback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在admin_setting_configcheckbox的用法示例。


在下文中一共展示了admin_setting_configcheckbox::set_updatedcallback方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slidshow AutoAdvance
$name = 'theme_lambda/slideshow_advance';
$title = get_string('slideshow_advance', 'theme_lambda');
$description = get_string('slideshow_advance_desc', 'theme_lambda');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slidshow Navigation
$name = 'theme_lambda/slideshow_nav';
$title = get_string('slideshow_nav', 'theme_lambda');
$description = get_string('slideshow_nav_desc', 'theme_lambda');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slideshow Loader
$name = 'theme_lambda/slideshow_loader';
$title = get_string('slideshow_loader', 'theme_lambda');
$description = get_string('slideshow_loader_desc', 'theme_lambda');
$default = '0';
$choices = array('0' => 'bar', '1' => 'pie', '2' => 'none');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// Slideshow Image FX
$name = 'theme_lambda/slideshow_imgfx';
$title = get_string('slideshow_imgfx', 'theme_lambda');
$description = get_string('slideshow_imgfx_desc', 'theme_lambda');
$setting = new admin_setting_configtext($name, $title, $description, 'random', PARAM_URL);
开发者ID:sirromas,项目名称:medical,代码行数:31,代码来源:settings.php

示例2:

<?php

// $Id: misc.php,v 1.14.2.5 2009/03/09 23:30:55 stronk7 Exp $
// * Miscellaneous settings
if ($hassiteconfig) {
    // speedup for non-admins, add all caps used on this page
    // Experimental settings page
    $temp = new admin_settingpage('experimental', get_string('experimental', 'admin'));
    $temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
    $item = new admin_setting_configcheckbox('enablehtmlpurifier', get_string('enablehtmlpurifier', 'admin'), get_string('configenablehtmlpurifier', 'admin'), 0);
    $item->set_updatedcallback('reset_text_filters_cache');
    $temp->add($item);
    $temp->add(new admin_setting_configcheckbox('enablegroupings', get_string('enablegroupings', 'admin'), get_string('configenablegroupings', 'admin'), 0));
    $rqsetting = new admin_setting_configcheckbox('selectmanual', get_string('selectmanualquestions', 'qtype_random'), get_string('configselectmanualquestions', 'qtype_random'), 0);
    $rqsetting->plugin = 'qtype_random';
    $temp->add($rqsetting);
    $temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0));
    $ADMIN->add('misc', $temp);
    // XMLDB editor
    $ADMIN->add('misc', new admin_externalpage('xmldbeditor', get_string('xmldbeditor'), "{$CFG->wwwroot}/{$CFG->admin}/xmldb/"));
    // hidden scripts linked from elsewhere
    $ADMIN->add('misc', new admin_externalpage('oacleanup', 'Online Assignment Cleanup', $CFG->wwwroot . '/' . $CFG->admin . '/oacleanup.php', 'moodle/site:config', true));
    $ADMIN->add('misc', new admin_externalpage('upgradeforumread', 'Upgrade forum', $CFG->wwwroot . '/' . $CFG->admin . '/upgradeforumread.php', 'moodle/site:config', true));
    $ADMIN->add('misc', new admin_externalpage('upgradelogs', 'Upgrade logs', $CFG->wwwroot . '/' . $CFG->admin . '/upgradelogs.php', 'moodle/site:config', true));
    $ADMIN->add('misc', new admin_externalpage('multilangupgrade', get_string('multilangupgrade', 'admin'), $CFG->wwwroot . '/' . $CFG->admin . '/multilangupgrade.php', 'moodle/site:config', !empty($CFG->filter_multilang_converted)));
}
// end of speedup
开发者ID:kai707,项目名称:ITSA-backup,代码行数:28,代码来源:misc.php

示例3:

    $temp->add(new admin_setting_configtext('docroot', new lang_string('docroot', 'admin'), new lang_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
    $temp->add(new admin_setting_configcheckbox('doctonewwindow', new lang_string('doctonewwindow', 'admin'), new lang_string('configdoctonewwindow', 'admin'), 0));
    $ADMIN->add('appearance', $temp);
    $temp = new admin_externalpage('mypage', new lang_string('mypage', 'admin'), $CFG->wwwroot . '/my/indexsys.php');
    $ADMIN->add('appearance', $temp);
    $temp = new admin_externalpage('profilepage', new lang_string('myprofile', 'admin'), $CFG->wwwroot . '/user/profilesys.php');
    $ADMIN->add('appearance', $temp);
    // coursecontact is the person responsible for course - usually manages enrolments, receives notification, etc.
    $temp = new admin_settingpage('coursecontact', new lang_string('courses'));
    $temp->add(new admin_setting_special_coursecontact());
    $temp->add(new admin_setting_configcheckbox('courselistshortnames', new lang_string('courselistshortnames', 'admin'), new lang_string('courselistshortnames_desc', 'admin'), 0));
    $ADMIN->add('appearance', $temp);
    $temp = new admin_settingpage('ajax', new lang_string('ajaxuse'));
    $temp->add(new admin_setting_configcheckbox('enableajax', new lang_string('enableajax', 'admin'), new lang_string('configenableajax', 'admin'), 1));
    $temp->add(new admin_setting_configcheckbox('useexternalyui', new lang_string('useexternalyui', 'admin'), new lang_string('configuseexternalyui', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('yuicomboloading', new lang_string('yuicomboloading', 'admin'), new lang_string('configyuicomboloading', 'admin'), 1));
    $setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1);
    $setting->set_updatedcallback('js_reset_all_caches');
    $temp->add($setting);
    $temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
    $ADMIN->add('appearance', $temp);
    // link to tag management interface
    $ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), "{$CFG->wwwroot}/tag/manage.php"));
    $temp = new admin_settingpage('additionalhtml', new lang_string('additionalhtml', 'admin'));
    $temp->add(new admin_setting_heading('additionalhtml_heading', new lang_string('additionalhtml_heading', 'admin'), new lang_string('additionalhtml_desc', 'admin')));
    $temp->add(new admin_setting_configtextarea('additionalhtmlhead', new lang_string('additionalhtmlhead', 'admin'), new lang_string('additionalhtmlhead_desc', 'admin'), '', PARAM_RAW));
    $temp->add(new admin_setting_configtextarea('additionalhtmltopofbody', new lang_string('additionalhtmltopofbody', 'admin'), new lang_string('additionalhtmltopofbody_desc', 'admin'), '', PARAM_RAW));
    $temp->add(new admin_setting_configtextarea('additionalhtmlfooter', new lang_string('additionalhtmlfooter', 'admin'), new lang_string('additionalhtmlfooter_desc', 'admin'), '', PARAM_RAW));
    $ADMIN->add('appearance', $temp);
}
// end of speedup
开发者ID:JP-Git,项目名称:moodle,代码行数:31,代码来源:appearance.php

示例4: add_checkbox

 public function add_checkbox($setting, $default = '0', $checked = '1', $unchecked = '0')
 {
     $checkbox = new admin_setting_configcheckbox($this->name_for($setting), $this->title_for($setting), $this->description_for($setting), $default, $checked, $unchecked);
     $checkbox->set_updatedcallback('theme_reset_all_caches');
     $this->settingspage->add($checkbox);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:6,代码来源:simple_theme_settings.class.php

示例5:

<?php

// * Miscellaneous settings
if ($hassiteconfig) {
    // speedup for non-admins, add all caps used on this page
    // Experimental settings page
    $ADMIN->add('development', new admin_category('experimental', new lang_string('experimental', 'admin')));
    $temp = new admin_settingpage('experimentalsettings', new lang_string('experimentalsettings', 'admin'));
    //TODO: Re-enable cc-import once re-implemented in 2.0.x
    //$temp->add(new admin_setting_configcheckbox('enableimsccimport', new lang_string('enable_cc_import', 'imscc'), new lang_string('enable_cc_import_description', 'imscc'), 0));
    $temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', new lang_string('enablesafebrowserintegration', 'admin'), new lang_string('configenablesafebrowserintegration', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', new lang_string('enablegroupmembersonly', 'admin'), new lang_string('configenablegroupmembersonly', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('dndallowtextandlinks', new lang_string('dndallowtextandlinks', 'admin'), new lang_string('configdndallowtextandlinks', 'admin'), 0));
    // The CSS optimiser setting. When changed we need to reset the theme caches in order to ensure they are regenerated through the optimiser.
    $enablecssoptimiser = new admin_setting_configcheckbox('enablecssoptimiser', new lang_string('enablecssoptimiser', 'admin'), new lang_string('enablecssoptimiser_desc', 'admin'), 0);
    $enablecssoptimiser->set_updatedcallback('theme_reset_all_caches');
    $temp->add($enablecssoptimiser);
    // Backup archive .mbz format: switching to .tar.gz enables larger files, better
    // progress reporting and possibly better performance. This is an experimental
    // setting but if successful, should be removed and enabled by default in a future
    // version. Note: this setting controls newly-created backups only; restore always
    // supports both formats.
    $temp->add(new admin_setting_configcheckbox('enabletgzbackups', new lang_string('enabletgzbackups', 'admin'), new lang_string('enabletgzbackups_desc', 'admin'), 0));
    $ADMIN->add('experimental', $temp);
    // "debugging" settingpage
    $temp = new admin_settingpage('debugging', new lang_string('debugging', 'admin'));
    $temp->add(new admin_setting_special_debug());
    $temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
    $temp->add(new admin_setting_configcheckbox('debugsmtp', new lang_string('debugsmtp', 'admin'), new lang_string('configdebugsmtp', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('perfdebug', new lang_string('perfdebug', 'admin'), new lang_string('configperfdebug', 'admin'), '7', '15', '7'));
    $temp->add(new admin_setting_configcheckbox('debugstringids', new lang_string('debugstringids', 'admin'), new lang_string('debugstringids_desc', 'admin'), 0));
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:31,代码来源:development.php

示例6:

<?php

// * Miscellaneous settings
if ($hassiteconfig) {
    // speedup for non-admins, add all caps used on this page
    // Experimental settings page
    $ADMIN->add('development', new admin_category('experimental', get_string('experimental', 'admin')));
    require_once $CFG->dirroot . '/search/lib.php';
    $temp = new admin_settingpage('experimentalsettings', get_string('experimentalsettings', 'admin'));
    $englobalsearch = new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0);
    $englobalsearch->set_updatedcallback('search_updatedcallback');
    $temp->add($englobalsearch);
    //TODO: Re-enable cc-import once re-implemented in 2.0.x
    //$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0));
    $temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0));
    $ADMIN->add('experimental', $temp);
    // "debugging" settingpage
    $temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
    $temp->add(new admin_setting_special_debug());
    $temp->add(new admin_setting_configcheckbox('debugdisplay', get_string('debugdisplay', 'admin'), get_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
    $temp->add(new admin_setting_configcheckbox('xmlstrictheaders', get_string('xmlstrictheaders', 'admin'), get_string('configxmlstrictheaders', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('debugsmtp', get_string('debugsmtp', 'admin'), get_string('configdebugsmtp', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('perfdebug', get_string('perfdebug', 'admin'), get_string('configperfdebug', 'admin'), '7', '15', '7'));
    $temp->add(new admin_setting_configcheckbox('debugstringids', get_string('debugstringids', 'admin'), get_string('configdebugstringids', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('debugvalidators', get_string('debugvalidators', 'admin'), get_string('configdebugvalidators', 'admin'), 0));
    $temp->add(new admin_setting_configcheckbox('debugpageinfo', get_string('debugpageinfo', 'admin'), get_string('configdebugpageinfo', 'admin'), 0));
    $ADMIN->add('development', $temp);
    // "profiling" settingpage (conditionally if the 'xhprof' extension is available only)
    if (extension_loaded('xhprof') && function_exists('xhprof_enable')) {
        $temp = new admin_settingpage('profiling', get_string('profiling', 'admin'));
开发者ID:nigeldaley,项目名称:moodle,代码行数:31,代码来源:development.php

示例7: dirname

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package    elisprogram_usetgroups
 * @author     Remote-Learner.net Inc
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 * @copyright  (C) 2008-2013 Remote-Learner.net Inc (http://www.remote-learner.net)
 *
 */
defined('MOODLE_INTERNAL') || die;
require_once dirname(__FILE__) . '/../../../../config.php';
global $CFG;
require_once $CFG->dirroot . '/local/elisprogram/lib/setup.php';
require_once elispm::file('plugins/usetgroups/lib.php');
if ($ADMIN->fulltree) {
    $settings->add(new admin_setting_heading('userset_grp_settings', get_string('userset_grp_settings', 'elisprogram_usetgroups'), ''));
    // Allow course-level group population from usersets
    $userset_groups = new admin_setting_configcheckbox('elisprogram_usetgroups/userset_groups', get_string('grp_pop_userset_setting', 'elisprogram_usetgroups'), get_string('grp_pop_userset_help', 'elisprogram_usetgroups'), 0);
    $userset_groups->set_updatedcallback('userset_groups_pm_userset_groups_enabled_handler');
    $settings->add($userset_groups);
    $sc_userset_groups = new admin_setting_configcheckbox('elisprogram_usetgroups/site_course_userset_groups', get_string('fp_pop_userset_setting', 'elisprogram_usetgroups'), get_string('fp_pop_userset_help', 'elisprogram_usetgroups'), 0);
    $sc_userset_groups->set_updatedcallback('userset_groups_pm_site_course_userset_groups_enabled_handler');
    $settings->add($sc_userset_groups);
    // Allow front page grouping creation from userset-based groups
    $userset_groupings = new admin_setting_configcheckbox('elisprogram_usetgroups/userset_groupings', get_string('fp_grp_userset_setting', 'elisprogram_usetgroups'), get_string('fp_grp_userset_help', 'elisprogram_usetgroups'), 0);
    $userset_groupings->set_updatedcallback('userset_groups_pm_userset_groupings_enabled');
    $settings->add($userset_groupings);
}
开发者ID:jamesmcq,项目名称:elis,代码行数:31,代码来源:settings.php

示例8: add_checkboxes

 public function add_checkboxes($setting, $instance, $default = '0', $checked = '1', $unchecked = '0')
 {
     $checkbox = new admin_setting_configcheckbox($this->name_for($setting . $instance), $this->title_for($setting, $instance), $this->description_for($setting), $default, $checked, $unchecked);
     $checkbox->set_updatedcallback('theme_reset_all_caches');
     return $checkbox;
 }
开发者ID:nadavkav,项目名称:moodle-accessibility,代码行数:6,代码来源:simple_theme_settings.class.php

示例9: array

    assign_capability('block/fn_site_groups:markallgroups', CAP_ALLOW, $gmroleid, $context->id);
    assign_capability('block/fn_site_groups:assignallusers', CAP_INHERIT, $gmroleid, $context->id);
    assign_capability('block/fn_site_groups:assignowngroupusers', CAP_ALLOW, $gmroleid, $context->id);
    assign_capability('block/fn_site_groups:createnewgroups', CAP_ALLOW, $gmroleid, $context->id);
} else {
    $gmroleid = $role->id;
}
$roles = get_records_menu('role', '', '', 'sortorder ASC', 'id,name');
if (empty($roles)) {
    $roles = array();
}
$course = get_site();
$role = get_default_course_role($course);
$defaultroleid = $role->id;
$item = new admin_setting_configcheckbox('block_fn_site_groups_enabled', get_string('fn_site_groups_enabled', 'block_fn_site_groups'), get_string('fn_config_site_groups_enabled', 'block_fn_site_groups'), '0');
$item->set_updatedcallback('fn_sg_set_site_group_mode');
$settings->add($item);
$settings->add(new admin_setting_configselect('block_fn_site_groups_defaultroleid', get_string('fn_site_groups_defaultroleid', 'block_fn_site_groups'), get_string('fn_config_site_groups_defaultroleid', 'block_fn_site_groups'), $defaultroleid, $roles));
$settings->add(new admin_setting_configmulticheckbox('block_fn_site_groups_roles', get_string('fn_site_groups_roles', 'block_fn_site_groups'), get_string('fn_config_site_groups_roles', 'block_fn_site_groups'), '0', $roles));
/// These settings don't actually use the $CFG variable, but are used to manage capabilities.
$caps = role_context_capabilities($gmroleid, $context);
$sgusers = array();
if (!empty($caps['block/fn_site_groups:assignowngroupusers'])) {
    $sgusers[] = 1;
}
if (!empty($caps['block/fn_site_groups:assignallusers'])) {
    $sgusers[] = 2;
}
$CFG->block_fn_site_groups_users = implode(',', $sgusers);
$users = array(1 => get_string('fn_site_groups:assignowngroupusers', 'block_fn_site_groups'), 2 => get_string('fn_site_groups:assignallusers', 'block_fn_site_groups'));
$item = new admin_setting_configmulticheckbox('block_fn_site_groups_users', get_string('fn_site_groups_users', 'block_fn_site_groups'), get_string('fn_config_site_groups_users', 'block_fn_site_groups'), '1', $users);
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:settings.php

示例10: array

 $settings = new admin_settingpage('local_elisprogram_settings', get_string('elis_settings', 'local_elisprogram'), 'local/elisprogram:config');
 // ***Track Settings
 $settings->add(new admin_setting_heading('track_settings', get_string('track_settings', 'local_elisprogram'), ''));
 // Turn off user defined tracks
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/userdefinedtrack', get_string('userdef_tracks_setting', 'local_elisprogram'), '', 0));
 // ***Learning Plan
 $settings->add(new admin_setting_heading('learning_plan', get_string('learningplan', 'local_elisprogram'), ''));
 // Turn off learning plan
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/disablecoursecatalog', get_string('learning_plan_setting', 'local_elisprogram'), '', 0));
 // Number of curricula to display before automatically collapsing
 $settings->add(new admin_setting_configtext('local_elisprogram/catalog_collapse_count', get_string('auto_collapse_setting', 'local_elisprogram'), '', 4, PARAM_INT));
 // TBD
 // Enable curriculum expiration
 $setting = new admin_setting_configcheckbox('local_elisprogram/enable_curriculum_expiration', get_string('crlm_expire_setting', 'local_elisprogram'), '', 0);
 //callback to handle updating curriculum assignment expiry times
 $setting->set_updatedcallback('curriculum_expiration_enabled_updatedcallback');
 $settings->add($setting);
 // Calculate curriculum expiration based on the time a student
 $opts = array(CURR_EXPIRE_ENROL_START => get_string('curriculum_expire_enrol_start', 'local_elisprogram'), CURR_EXPIRE_ENROL_COMPLETE => get_string('curriculum_expire_enrol_complete', 'local_elisprogram'));
 $setting = new admin_setting_configselect('local_elisprogram/curriculum_expiration_start', get_string('expire_basis_setting', 'local_elisprogram'), '', CURR_EXPIRE_ENROL_START, $opts);
 //callback to handle updating curriculum assignment expiry times
 $setting->set_updatedcallback('curriculum_expiration_start_updatedcallback');
 $settings->add($setting);
 // TBD
 // Allow students to see completed courses on their dashboard
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/display_completed_courses', get_string('completed_courses_setting', 'local_elisprogram'), get_string('completed_courses_help', 'local_elisprogram'), 1));
 // ***Certificates
 $settings->add(new admin_setting_heading('certificates', get_string('certificates', 'local_elisprogram'), ''));
 // Disable Certificates
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/disablecoursecertificates', get_string('disable_crs_cert', 'local_elisprogram'), get_string('disable_crs_cert_desc', 'local_elisprogram'), 0));
 $settings->add(new admin_setting_configcheckbox('local_elisprogram/disablecertificates', get_string('disable_cert_setting', 'local_elisprogram'), '', 1));
开发者ID:jamesmcq,项目名称:elis,代码行数:31,代码来源:settings.php


注:本文中的admin_setting_configcheckbox::set_updatedcallback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。