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


PHP admin_setting_configtext::set_updatedcallback方法代码示例

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


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

示例1:

$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
// This is the descriptor for icon eight
$name = 'theme_pioneer/navicon8info';
$heading = get_string('navicon8', 'theme_pioneer');
$information = get_string('navicondesc', 'theme_pioneer');
$setting = new admin_setting_heading($name, $heading, $information);
$temp->add($setting);
$name = 'theme_pioneer/nav8icon';
$title = get_string('navicon', 'theme_pioneer');
$description = get_string('navicondesc', 'theme_pioneer');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$name = 'theme_pioneer/nav8buttontext';
$title = get_string('naviconbuttontext', 'theme_pioneer');
$description = get_string('naviconbuttontextdesc', 'theme_pioneer');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$name = 'theme_pioneer/nav8buttonurl';
$title = get_string('naviconbuttonurl', 'theme_pioneer');
$description = get_string('naviconbuttonurldesc', 'theme_pioneer');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$ADMIN->add('theme_pioneer', $temp);
开发者ID:kennibc,项目名称:moodle-theme_pioneer,代码行数:31,代码来源:iconnavigation.php

示例2: add_text

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

示例3: array

    $timezone = 0;
} else {
    if ($timezone > 0) {
        $timezone = $timezone - 24;
    }
}
$options = array();
for ($i = 0; $i <= 23; $i++) {
    $options[($i - $timezone) % 24] = gmdate('H:i', $i * HOURSECS);
}
$settings->add(new admin_setting_configmultiselect('hotpot_enablecron', get_string('enablecron', 'mod_hotpot'), get_string('configenablecron', 'mod_hotpot'), array(), $options));
// enable embedding of swf media objects inhotpot quizzes (default=1)
$settings->add(new admin_setting_configcheckbox('hotpot_enableswf', get_string('enableswf', 'mod_hotpot'), get_string('configenableswf', 'mod_hotpot'), 1));
// enable obfuscation of javascript in html files (default=1)
$settings->add(new admin_setting_configcheckbox('hotpot_enableobfuscate', get_string('enableobfuscate', 'mod_hotpot'), get_string('configenableobfuscate', 'mod_hotpot'), 1));
$options = array(hotpot::BODYSTYLES_BACKGROUND => get_string('bodystylesbackground', 'mod_hotpot'), hotpot::BODYSTYLES_COLOR => get_string('bodystylescolor', 'mod_hotpot'), hotpot::BODYSTYLES_FONT => get_string('bodystylesfont', 'mod_hotpot'), hotpot::BODYSTYLES_MARGIN => get_string('bodystylesmargin', 'mod_hotpot'));
$settings->add(new admin_setting_configmultiselect('hotpot_bodystyles', get_string('bodystyles', 'mod_hotpot'), get_string('configbodystyles', 'mod_hotpot'), array(), $options));
// hotpot navigation frame height (default=85)
$settings->add(new admin_setting_configtext('hotpot_frameheight', get_string('frameheight', 'mod_hotpot'), get_string('configframeheight', 'mod_hotpot'), 85, PARAM_INT, 4));
// lock hotpot navigation frame so it is not scrollable (default=0)
$settings->add(new admin_setting_configcheckbox('hotpot_lockframe', get_string('lockframe', 'mod_hotpot'), get_string('configlockframe', 'mod_hotpot'), 0));
// store raw xml details of HotPot quiz attempts (default=1)
$str = get_string('cleardetails', 'mod_hotpot');
$url = new moodle_url('/mod/hotpot/tools/clear_details.php', array('sesskey' => sesskey()));
$link = html_writer::link($url, $str, array('class' => 'small', 'style' => 'white-space: nowrap', 'onclick' => "this.target='_blank'")) . "\n";
$settings->add(new admin_setting_configcheckbox('hotpot_storedetails', get_string('storedetails', 'mod_hotpot'), get_string('configstoredetails', 'mod_hotpot') . ' ' . $link, 0));
// maximum duration of a single calendar event (default=5 mins)
$setting = new admin_setting_configtext('hotpot_maxeventlength', get_string('maxeventlength', 'mod_hotpot'), get_string('configmaxeventlength', 'mod_hotpot'), 5, PARAM_INT, 4);
$setting->set_updatedcallback('hotpot_refresh_events');
$settings->add($setting);
unset($i, $link, $options, $setting, $str, $timezone, $datetime, $url);
开发者ID:OctaveBabel,项目名称:moodle-itop,代码行数:31,代码来源:settings.php

示例4: add_texts

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

示例5: dirname

require_once dirname(__FILE__) . '/lib.php';
// Start of "scheduling" section
$settings->add(new admin_setting_heading('dhexport_version1elis/scheduling', get_string('exportfilesheading', 'dhexport_version1elis'), ''));
// Export filename settings
$settings->add(new admin_setting_configtext('dhexport_version1elis/export_path', get_string('export_path', 'dhexport_version1elis'), get_string('config_export_path', 'dhexport_version1elis'), '/datahub/dhexport_version1elis'));
$settings->add(new admin_setting_configtext('dhexport_version1elis/export_file', get_string('export_file', 'dhexport_version1elis'), get_string('config_export_file', 'dhexport_version1elis'), 'export_version1elis.csv'));
// Timestamp export file
$settings->add(new admin_setting_configcheckbox('dhexport_version1elis/export_file_timestamp', get_string('export_file_timestamp_label', 'dhexport_version1elis'), get_string('config_export_file_timestamp', 'dhexport_version1elis'), 1));
// Start of "logging" section
$settings->add(new admin_setting_heading('dhexport_version1elis/logging', get_string('logging', 'dhexport_version1elis'), ''));
// Log file location
$settings->add(new admin_setting_configtext('dhexport_version1elis/logfilelocation', get_string('logfilelocation', 'dhexport_version1elis'), get_string('configlogfilelocation', 'dhexport_version1elis'), RLIP_DEFAULT_LOG_PATH));
// Email notification
$settings->add(new admin_setting_configtext('dhexport_version1elis/emailnotification', get_string('emailnotification', 'dhexport_version1elis'), get_string('configemailnotification', 'dhexport_version1elis'), ''));
/**
 * Time period settings
 */
// Header
$headerstring = get_string('timeperiodheader', 'dhexport_version1elis');
$settings->add(new admin_setting_heading('dhexport_version1elis_timeperiod', $headerstring, ''));
// Checkbox for enabling
$displaystring = get_string('nonincremental', 'dhexport_version1elis');
$infostring = get_string('confignonincremental', 'dhexport_version1elis');
$settings->add(new admin_setting_configcheckbox('dhexport_version1elis/nonincremental', $displaystring, $infostring, 0));
// Time delta
$displaystring = get_string('incrementaldelta', 'dhexport_version1elis');
$infostring = get_string('configincrementaldelta', 'dhexport_version1elis');
$setting = new admin_setting_configtext('dhexport_version1elis/incrementaldelta', $displaystring, $infostring, '1d');
// Callback to sanitize time delta
$setting->set_updatedcallback('rlipexport_version1elis_incrementaldelta_updatedcallback');
$settings->add($setting);
开发者ID:jamesmcq,项目名称:elis,代码行数:31,代码来源:settings.php


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