PHP Класс Piwik\Plugin\SettingsProvider

Descendants of this class should implement the {@link init()} method and call the {@link addSetting()} method for each of the plugin's settings. For an example, see the {@link Piwik\Plugins\ExampleSettingsPlugin\ExampleSettingsPlugin} plugin.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Manager $pluginManager )
getAllMeasurableSettings ( integer $idSite, string | null $idMeasurableType = null ) : MeasurableSettings[]
getAllSystemSettings ( ) : SystemSettings[] Returns all available system settings. A plugin has to specify a file named SystemSettings.php containing a class named SystemSettings that extends Piwik\Settings\Plugin\SystemSettings in order to be considered as a system setting. Otherwise the settings for a plugin won't be available.
getAllUserSettings ( ) : UserSettings[] Returns all available user settings. A plugin has to specify a file named UserSettings.php containing a class named UserSettings that extends Piwik\Settings\Plugin\UserSettings in order to be considered as a plugin setting. Otherwise the settings for a plugin won't be available.
getMeasurableSettings ( string $pluginName, integer $idSite, string | null $idType = null ) : MeasurableSettings | null
getSystemSettings ( string $pluginName ) : SystemSettings | null Get user settings implemented by a specific plugin (if implemented by this plugin).
getUserSettings ( string $pluginName ) : UserSettings | null Get user settings implemented by a specific plugin (if implemented by this plugin).

Приватные методы

Метод Описание
getLoadedAndActivated ( $pluginName )

Описание методов

__construct() публичный Метод

public __construct ( Manager $pluginManager )
$pluginManager Manager

getAllMeasurableSettings() публичный Метод

public getAllMeasurableSettings ( integer $idSite, string | null $idMeasurableType = null ) : MeasurableSettings[]
$idSite integer The ID of a site. If a site is about to be created pass idSite = 0.
$idMeasurableType string | null If null, idType will be detected automatically if the site already exists. Only needed to set a value when idSite = 0 (this is the case when a site is about) to be created.
Результат Piwik\Settings\Measurable\MeasurableSettings[]

getAllSystemSettings() публичный Метод

Returns all available system settings. A plugin has to specify a file named SystemSettings.php containing a class named SystemSettings that extends Piwik\Settings\Plugin\SystemSettings in order to be considered as a system setting. Otherwise the settings for a plugin won't be available.
public getAllSystemSettings ( ) : SystemSettings[]
Результат Piwik\Settings\Plugin\SystemSettings[] An array containing array([pluginName] => [setting instance]).

getAllUserSettings() публичный Метод

Returns all available user settings. A plugin has to specify a file named UserSettings.php containing a class named UserSettings that extends Piwik\Settings\Plugin\UserSettings in order to be considered as a plugin setting. Otherwise the settings for a plugin won't be available.
public getAllUserSettings ( ) : UserSettings[]
Результат Piwik\Settings\Plugin\UserSettings[] An array containing array([pluginName] => [setting instance]).

getMeasurableSettings() публичный Метод

public getMeasurableSettings ( string $pluginName, integer $idSite, string | null $idType = null ) : MeasurableSettings | null
$pluginName string The name of a plugin.
$idSite integer The ID of a site. If a site is about to be created pass idSite = 0.
$idType string | null If null, idType will be detected automatically if the site already exists. Only needed to set a value when idSite = 0 (this is the case when a site is about) to be created.
Результат Piwik\Settings\Measurable\MeasurableSettings | null Returns null if no MeasurableSettings implemented by this plugin or when plugin is not loaded and activated. Returns an instance of the settings otherwise.

getSystemSettings() публичный Метод

Get user settings implemented by a specific plugin (if implemented by this plugin).
public getSystemSettings ( string $pluginName ) : SystemSettings | null
$pluginName string
Результат Piwik\Settings\Plugin\SystemSettings | null

getUserSettings() публичный Метод

Get user settings implemented by a specific plugin (if implemented by this plugin).
public getUserSettings ( string $pluginName ) : UserSettings | null
$pluginName string
Результат Piwik\Settings\Plugin\UserSettings | null