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


PHP admin_setting类代码示例

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


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

示例1: __construct

 /**
  * Config text constructor
  *
  * @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
  * @param string $visiblename localised
  * @param string $description long localised info
  * @param string $defaultsetting
  * @param int $size default field size
  */
 public function __construct($name, $visiblename, $description, $defaultsetting, $size = null)
 {
     $this->paramtype = PARAM_INT;
     $this->size = !is_null($size) ? $size : 30;
     admin_setting::__construct($name, $visiblename, $description, $defaultsetting);
 }
开发者ID:Dextirpe,项目名称:moodle-mod_turnitintooltwo,代码行数:15,代码来源:settingslib.php

示例2: admin_setting_alfresco_category_select

 function admin_setting_alfresco_category_select($name, $heading, $information)
 {
     parent::admin_setting($name, $heading, $information, '');
 }
开发者ID:remotelearner,项目名称:elis.alfresco,代码行数:4,代码来源:admin_settings_alfresco.php

示例3: __construct

 /**
  * Constructor
  *
  * @param string $name
  * @param string $visiblename
  * @param string $information text in box
  */
 public function __construct($name, $visiblename, $linktext, $linkurl, $description)
 {
     $this->nosave = true;
     $this->linktext = $linktext;
     $this->linkurl = $linkurl;
     parent::__construct($name, $visiblename, $description, '');
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:14,代码来源:toollink.php

示例4: __construct

 /**
  * Config text constructor
  *
  * @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
  * @param string $visiblename localised
  * @param string $description long localised info
  * @param string $defaultsetting
  * @param block_course_menu $block object
  */
 public function __construct($name, $visiblename, $description, $defaultsetting, $block)
 {
     $this->_block = $block;
     $this->html = $this->_block->output_global_config();
     $name = 'block_course_menu_' . $name;
     parent::__construct($name, $visiblename, $description, $defaultsetting);
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:16,代码来源:settingslib.php

示例5: array

 function __construct()
 {
     global $CFG;
     parent::__construct("plugins", get_string('plugin_settings', 'block_yui_menu'), get_string('configplugin_settings', 'block_yui_menu'), array());
     $pluginpath = $CFG->dirroot . '/blocks/yui_menu/plugin';
     $this->items = block_yui_menu::list_all_plugins($pluginpath);
     $this->plugin = 'block_yui_menu';
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:8,代码来源:settingslib.php

示例6: __construct

 /**
  * Construct override, requires one param
  *
  * @param bool $loggedin Is the user logged in
  */
 public function __construct($role) {
     global $CFG;
     $this->role = $role;
     $name = $role . 'Notifications';
     $visiblename = get_string($role . 'notifications', 'block_reportdashboard');
     $description = get_string($role . 'configfrontpage', 'block_reportdashboard');
     $defaults = array(NOTIFICATIONCOURSE);
     parent::__construct($name, $visiblename, $description, $defaults);
 }
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:14,代码来源:lib.php

示例7: __construct

 /**
  * Config text constructor
  *
  * @param string $name unique ascii name
  * @param string $visiblename localised
  * @param string $description long localised info
  * @param string $defaultsetting
  * @param mixed $paramtype int means PARAM_XXX type, string is a allowed format in regex
  * @param int $size default field size
  */
 public function __construct($name, $visiblename, $description, $defaultsetting, $paramtype = PARAM_RAW, $size = null)
 {
     $this->paramtype = $paramtype;
     if (!is_null($size)) {
         $this->size = $size;
     } else {
         $this->size = $paramtype === PARAM_INT ? 5 : 30;
     }
     parent::__construct($name, $visiblename, $description, $defaultsetting);
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:20,代码来源:systemapiuser.php

示例8: __construct

 /**
  * Constructor
  * @param string $name unique ascii name, either 'mysetting' for settings that in config,
  *                     or 'myplugin/mysetting' for ones in config_plugins.
  * @param string $visiblename localised name
  * @param string $description localised long description
  * @param mixed $defaultsetting string or array depending on implementation
  */
 public function __construct($name, $visiblename, $description, $defaultsetting)
 {
     global $DB;
     $this->syncbehavopts = ['oncreate' => get_string('update_oncreate', 'auth'), 'onlogin' => get_string('update_onlogin', 'auth'), 'always' => get_string('settings_fieldmap_update_always', 'local_o365')];
     $this->remotefields = ['objectId' => get_string('settings_fieldmap_field_objectId', 'local_o365'), 'displayName' => get_string('settings_fieldmap_field_displayName', 'local_o365'), 'givenName' => get_string('settings_fieldmap_field_givenName', 'local_o365'), 'surname' => get_string('settings_fieldmap_field_surname', 'local_o365'), 'mail' => get_string('settings_fieldmap_field_mail', 'local_o365'), 'streetAddress' => get_string('settings_fieldmap_field_streetAddress', 'local_o365'), 'city' => get_string('settings_fieldmap_field_city', 'local_o365'), 'postalCode' => get_string('settings_fieldmap_field_postalCode', 'local_o365'), 'state' => get_string('settings_fieldmap_field_state', 'local_o365'), 'country' => get_string('settings_fieldmap_field_country', 'local_o365'), 'jobTitle' => get_string('settings_fieldmap_field_jobTitle', 'local_o365'), 'department' => get_string('settings_fieldmap_field_department', 'local_o365'), 'companyName' => get_string('settings_fieldmap_field_companyName', 'local_o365'), 'telephoneNumber' => get_string('settings_fieldmap_field_telephoneNumber', 'local_o365'), 'facsimileTelephoneNumber' => get_string('settings_fieldmap_field_facsimileTelephoneNumber', 'local_o365'), 'mobile' => get_string('settings_fieldmap_field_mobile', 'local_o365'), 'preferredLanguage' => get_string('settings_fieldmap_field_preferredLanguage', 'local_o365')];
     $this->localfields = ['idnumber' => get_string('idnumber'), 'firstname' => get_string('firstname'), 'lastname' => get_string('lastname'), 'email' => get_string('email'), 'address' => get_string('address'), 'city' => get_string('city'), 'country' => get_string('country'), 'department' => get_string('department'), 'institution' => get_string('institution'), 'phone1' => get_string('phone'), 'phone2' => get_string('phone2'), 'lang' => get_string('language'), 'theme' => get_string('theme')];
     $customfields = $DB->get_records_select('user_info_field', 'datatype = ? OR datatype = ?', ['text', 'textarea']);
     foreach ($customfields as $field) {
         $this->localfields['profile_field_' . $field->shortname] = $field->name;
     }
     return parent::__construct($name, $visiblename, $description, $defaultsetting);
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:20,代码来源:fieldmap.php

示例9: is_related

 /**
  * Checks if $query is one of the available subplugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $subplugins = core_component::get_plugin_list('tinymce');
     foreach ($subplugins as $name => $dir) {
         if (stripos($name, $query) !== false) {
             return true;
         }
         $namestr = get_string('pluginname', 'tinymce_' . $name);
         if (strpos(core_text::strtolower($namestr), core_text::strtolower($query)) !== false) {
             return true;
         }
     }
     return false;
 }
开发者ID:evltuma,项目名称:moodle,代码行数:23,代码来源:adminlib.php

示例10: is_related

 /**
  * Check if this is $query is related to a choice
  *
  * @param string $query
  * @return bool true if related, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     if (!$this->load_choices()) {
         return false;
     }
     foreach ($this->choices as $key => $value) {
         if (strpos(core_text::strtolower($key), $query) !== false) {
             return true;
         }
         if (strpos(core_text::strtolower($value), $query) !== false) {
             return true;
         }
     }
     return false;
 }
开发者ID:lucisgit,项目名称:moodle-theme_essential,代码行数:24,代码来源:essential_admin_setting_configradio.php

示例11: is_related

 /**
  * Checks if $query is one of the available log plugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $query = core_text::strtolower($query);
     $plugins = \tool_log\log\manager::get_store_plugins();
     foreach ($plugins as $plugin => $fulldir) {
         if (strpos(core_text::strtolower($plugin), $query) !== false) {
             return true;
         }
         $localised = get_string('pluginname', $plugin);
         if (strpos(core_text::strtolower($localised), $query) !== false) {
             return true;
         }
     }
     return false;
 }
开发者ID:pzhu2004,项目名称:moodle,代码行数:24,代码来源:setting_managestores.php

示例12: is_related

 /**
  * Checks if $query is one of the available dataformfield plugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $query = \core_text::strtolower($query);
     $plugins = \core_component::get_plugin_list('dataformfield');
     foreach ($plugins as $plugin => $fulldir) {
         if (strpos(\core_text::strtolower($plugin), $query) !== false) {
             return true;
         }
         $localised = get_string('pluginname', "dataformfield_{$plugin}");
         if (strpos(\core_text::strtolower($localised), $query) !== false) {
             return true;
         }
     }
     return false;
 }
开发者ID:parksandwildlife,项目名称:learning,代码行数:24,代码来源:managedataformfield.php

示例13: __construct

 public function __construct($name, $visiblename, $description, $defaultsetting)
 {
     $this->plugin = 'quiz';
     parent::__construct($name, $visiblename, $description, $defaultsetting);
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:5,代码来源:settingslib.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param string $name Name of the setting.
  * @param string $visiblename Visible name of the setting.
  * @param string $description Description of the setting.
  * @param array $defaultsetting Default value.
  * @param array $choices Array of icon choices.
  */
 public function __construct($name, $visiblename, $description, $defaultsetting, $choices)
 {
     $this->choices = $choices;
     parent::__construct($name, $visiblename, $description, $defaultsetting, $choices);
 }
开发者ID:eugeneventer,项目名称:o365-moodle,代码行数:14,代码来源:iconselect.php

示例15: __construct

 /**
  * Constructor
  *
  * @param string $name unique ascii name, either 'mysetting' for settings that in config, or
  * 'myplugin/mysetting' for ones in config_plugins.
  * @param string $visiblename localised
  * @param string $description long localised info
  */
 public function __construct($name, $visiblename, $description)
 {
     $this->nosave = true;
     global $PAGE;
     if ($PAGE->bodyid == 'page-admin-setting-' . $name) {
         $bc = new block_contents();
         $bc->title = get_string('styleguide', 'theme_essential');
         $bc->attributes['class'] = 'block block_style_guide';
         $bc->content = '<ul class="nav nav-list">';
         $bc->content .= '<li><a href="#gridSystem"><i class="fa fa-hand-o-right"></i> Grid system</a></li>';
         $bc->content .= '<li><a href="#fluidGridSystem"><i class="fa fa-hand-o-right"></i> Fluid grid system</a></li>';
         $bc->content .= '<li><a href="#layouts"><i class="fa fa-hand-o-right"></i> Layouts</a></li>';
         $bc->content .= '<li><a href="#responsive"><i class="fa fa-hand-o-right"></i> Responsive design</a></li>';
         $bc->content .= '<li><a href="#typography"><i class="fa fa-hand-o-right"></i> Typography</a></li>';
         $bc->content .= '<li><a href="#code"><i class="fa fa-hand-o-right"></i> Code</a></li>';
         $bc->content .= '<li><a href="#tables"><i class="fa fa-hand-o-right"></i> Tables</a></li>';
         $bc->content .= '<li><a href="#forms"><i class="fa fa-hand-o-right"></i> Forms</a></li>';
         $bc->content .= '<li><a href="#buttons"><i class="fa fa-hand-o-right"></i> Buttons</a></li>';
         $bc->content .= '<li><a href="#images"><i class="fa fa-hand-o-right"></i> Images</a></li>';
         $bc->content .= '<li><a href="#dropdowns"><i class="fa fa-hand-o-right"></i> Dropdowns</a></li>';
         $bc->content .= '<li><a href="#buttonGroups"><i class="fa fa-hand-o-right"></i> Button groups</a></li>';
         $bc->content .= '<li><a href="#buttonDropdowns"><i class="fa fa-hand-o-right"></i> Button dropdowns</a></li>';
         $bc->content .= '<li><a href="#navs"><i class="fa fa-hand-o-right"></i> Navs</a></li>';
         $bc->content .= '<li><a href="#navbar"><i class="fa fa-hand-o-right"></i> Navbar</a></li>';
         $bc->content .= '<li><a href="#breadcrumbs"><i class="fa fa-hand-o-right"></i> Breadcrumbs</a></li>';
         $bc->content .= '<li><a href="#pagination"><i class="fa fa-hand-o-right"></i> Pagination</a></li>';
         $bc->content .= '<li><a href="#labels-badges"><i class="fa fa-hand-o-right"></i> Labels and badges</a></li>';
         $bc->content .= '<li><a href="#typography"><i class="fa fa-hand-o-right"></i> Typography</a></li>';
         $bc->content .= '<li><a href="#thumbnails"><i class="fa fa-hand-o-right"></i> Thumbnails</a></li>';
         $bc->content .= '<li><a href="#alerts"><i class="fa fa-hand-o-right"></i> Alerts</a></li>';
         $bc->content .= '<li><a href="#progress"><i class="fa fa-hand-o-right"></i> Progress bars</a></li>';
         $bc->content .= '<li><a href="#media"><i class="fa fa-hand-o-right"></i> Media object</a></li>';
         $bc->content .= '<li><a href="#misc"><i class="fa fa-hand-o-right"></i> Misc</a></li>';
         $bc->content .= '<li><a href="#overview"><i class="fa fa-hand-o-right"></i> JavaScript overview</a></li>';
         $bc->content .= '<li><a href="#transitions"><i class="fa fa-hand-o-right"></i> Transitions</a></li>';
         $bc->content .= '<li><a href="#modals"><i class="fa fa-hand-o-right"></i> Modal</a></li>';
         $bc->content .= '<li><a href="#dropdowns"><i class="fa fa-hand-o-right"></i> Dropdown</a></li>';
         $bc->content .= '<li><a href="#scrollspy"><i class="fa fa-hand-o-right"></i> Scrollspy</a></li>';
         $bc->content .= '<li><a href="#tabs"><i class="fa fa-hand-o-right"></i> Tab</a></li>';
         $bc->content .= '<li><a href="#tooltips"><i class="fa fa-hand-o-right"></i> Tooltip</a></li>';
         $bc->content .= '<li><a href="#popovers"><i class="fa fa-hand-o-right"></i> Popover</a></li>';
         $bc->content .= '<li><a href="#alerts"><i class="fa fa-hand-o-right"></i> Alert</a></li>';
         $bc->content .= '<li><a href="#buttons"><i class="fa fa-hand-o-right"></i> Button</a></li>';
         $bc->content .= '<li><a href="#collapse"><i class="fa fa-hand-o-right"></i> Collapse</a></li>';
         $bc->content .= '<li><a href="#carousel"><i class="fa fa-hand-o-right"></i> Carousel</a></li>';
         $bc->content .= '<li><a href="#typeahead"><i class="fa fa-hand-o-right"></i> Typeahead</a></li>';
         $bc->content .= '<li><a href="#affix"><i class="fa fa-hand-o-right"></i> Affix</a></li>';
         $bc->content .= '</ul>';
         $defaultregion = $PAGE->blocks->get_default_region();
         $PAGE->blocks->add_fake_block($bc, $defaultregion);
         $PAGE->requires->js_call_amd('theme_essential/styleguide', 'init');
     }
     parent::__construct($name, $visiblename, $description, '');
 }
开发者ID:jpahullo,项目名称:moodle-theme_essential,代码行数:62,代码来源:essential_admin_setting_styleguide.php


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