Piwik\Plugin\SettingsProvider::getMeasurableSettings PHP Метод

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.
    public function getMeasurableSettings($pluginName, $idSite, $idType = null)
    {
        $plugin = $this->getLoadedAndActivated($pluginName);
        if ($plugin) {
            $component = $plugin->findComponent('MeasurableSettings', 'Piwik\\Settings\\Measurable\\MeasurableSettings');
            if ($component) {
                return StaticContainer::getContainer()->make($component, array('idSite' => $idSite, 'idMeasurableType' => $idType));
            }
        }
    }