本文整理汇总了PHP中admin_setting_configtext::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP admin_setting_configtext::__construct方法的具体用法?PHP admin_setting_configtext::__construct怎么用?PHP admin_setting_configtext::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin_setting_configtext
的用法示例。
在下文中一共展示了admin_setting_configtext::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param string $name
* @param string $visiblename
* @param string $description
* @param mixed $defaultsetting string or array
* @param mixed $paramtype
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $paramtype = PARAM_RAW, $cols = '60', $rows = '8', $filearea = 'bcumarketingimages')
{
$this->rows = $rows;
$this->cols = $cols;
$this->filearea = $filearea;
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype);
editors_head_setup();
}
示例2: __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 $lower lower range limit
* @param int $upper upper range limit
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $lower, $upper)
{
if ($upper < $lower) {
throw new coding_exception('Upper range limit is less than the lower range limit.');
}
$this->lower = $lower;
$this->upper = $upper;
parent::__construct($name, $visiblename, $description, $defaultsetting, PARAM_INT);
}
示例3: __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 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_TRIMMED, $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);
}
示例4: __construct
/**
* Constructor: uses parent::__construct
*
* @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 default value for the setting
* @param boolean $lowercase if true, lowercase the value before writing it to the db.
* @param boolean $enabled if true, the input field is enabled, otherwise it's disabled.
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $lowercase = false, $enabled = true)
{
$this->lowercase = $lowercase;
$this->enabled = $enabled;
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
示例5: __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
* @param array $defaultsetting ('value'=>string, '__construct'=>bool)
* @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)
{
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype, $size);
}
示例6: __construct
/**
* Config gradepointmax constructor
*
* @param string $name Overidden by "gradepointmax"
* @param string $visiblename Overridden by "gradepointmax" language string.
* @param string $description Overridden by "gradepointmax_help" language string.
* @param string $defaultsetting Not used, overridden by 100.
* @param mixed $paramtype Overridden by PARAM_INT.
* @param int $size Overridden by 5.
*/
public function __construct($name = '', $visiblename = '', $description = '', $defaultsetting = '', $paramtype = PARAM_INT, $size = 5)
{
$name = 'gradepointmax';
$visiblename = get_string('gradepointmax', 'grades');
$description = get_string('gradepointmax_help', 'grades');
$defaultsetting = 100;
$paramtype = PARAM_INT;
$size = 5;
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype, $size);
}
示例7: __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
* @param array $defaultsetting ('value'=>string, '__construct'=>bool)
* @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)
{
parent::__construct($name, $visiblename, $description, $defaultsetting['value'], $paramtype, $size);
$this->set_advanced_flag_options(admin_setting_flag::ENABLED, !empty($defaultsetting['adv']));
}
示例8: __construct
public function __construct($name, $visiblename, $description, $defaultsetting)
{
parent::__construct($name, $visiblename, $description, $defaultsetting, PARAM_RAW, 50);
}
示例9: __construct
public function __construct($role)
{
parent::__construct('enrol_flatfile/map_' . $role->id, $role->localname, '', $role->shortname);
}
示例10: __construct
public function __construct($name, $visiblename, $description, $defaultsetting, $paramtype)
{
parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype);
}
示例11: __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 $regex RegEx expression to test.
* @param int $error Error message to show if validation fails.
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $regex, $error)
{
$this->regex = $regex;
$this->error = $error;
parent::__construct($name, $visiblename, $description, $defaultsetting);
}