Наследование: extends Piwik\Plugin\ControllerAdmin
Пример #1
0
 /**
  * Returns the settings for the data purging feature.
  *
  * @return array
  */
 public static function getPurgeDataSettings()
 {
     $settings = array();
     // load settings from ini config
     $config = PiwikConfig::getInstance();
     foreach (self::$purgeDataOptions as $configKey => $configSection) {
         $values = $config->{$configSection};
         $settings[$configKey] = $values[$configKey];
     }
     if (!Controller::isDataPurgeSettingsEnabled()) {
         return $settings;
     }
     // load the settings for the data purging settings
     foreach (self::$purgeDataOptions as $configName => $configSection) {
         $value = Option::get($configName);
         if ($value !== false) {
             $settings[$configName] = $value;
         }
     }
     return $settings;
 }
Пример #2
0
 private function checkDataPurgeAdminSettingsIsEnabled()
 {
     if (!Controller::isDataPurgeSettingsEnabled()) {
         throw new \Exception("Configuring deleting log data and report data has been disabled by Piwik admins.");
     }
 }