Piwik\Settings\Plugin\UserSettings::makeSetting PHP Метод

makeSetting() защищенный Метод

Settings will be displayed in the UI depending on the order of makeSetting calls. This means you can define the order of the displayed settings by calling makeSetting first for more important settings.
protected makeSetting ( string $name, mixed $defaultValue, string $type, $configureCallback ) : UserSetting
$name string The name of the setting that shall be created
$defaultValue mixed The default value for this setting. Note the value will not be converted to the specified type.
$type string The PHP internal type the value of this setting should have. Use one of FieldConfig::TYPE_* constancts
Результат UserSetting Returns an instance of the created measurable setting.
    protected function makeSetting($name, $defaultValue, $type, $configureCallback)
    {
        $userLogin = Piwik::getCurrentUserLogin();
        $setting = new UserSetting($name, $defaultValue, $type, $this->pluginName, $userLogin);
        $setting->setConfigureCallback($configureCallback);
        $this->addSetting($setting);
        return $setting;
    }