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.
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
__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