Piwik\Plugins\UserCountry\UserCountry::isGeoLocationAdminEnabled PHP 메소드

isGeoLocationAdminEnabled() 공개 정적인 메소드

public static isGeoLocationAdminEnabled ( )
    public static function isGeoLocationAdminEnabled()
    {
        return (bool) Config::getInstance()->General['enable_geolocation_admin'];
    }

Usage Example

예제 #1
0
파일: API.php 프로젝트: piwik/piwik
 /**
  * Set the location provider
  *
  * @param string $providerId  The ID of the provider to use  eg 'default', 'geoip_php', ...
  * @throws Exception if ID is invalid
  */
 public function setLocationProvider($providerId)
 {
     Piwik::checkUserHasSuperUserAccess();
     if (!UserCountry::isGeoLocationAdminEnabled()) {
         throw new \Exception('Setting geo location has been disabled in config.');
     }
     $provider = LocationProvider::setCurrentProvider($providerId);
     if ($provider === false) {
         throw new Exception("Invalid provider ID: '{$providerId}'.");
     }
 }
All Usage Examples Of Piwik\Plugins\UserCountry\UserCountry::isGeoLocationAdminEnabled