/** * @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(); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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'])); }
public function __construct($name, $visiblename, $description, $defaultsetting) { parent::__construct($name, $visiblename, $description, $defaultsetting, PARAM_RAW, 50); }
public function __construct($role) { parent::__construct('enrol_flatfile/map_' . $role->id, $role->localname, '', $role->shortname); }
public function __construct($name, $visiblename, $description, $defaultsetting, $paramtype) { parent::__construct($name, $visiblename, $description, $defaultsetting, $paramtype); }
/** * 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); }