Piwik\Plugin\Report::isEnabled PHP Метод

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

Defines whether a report is enabled or not. For instance some reports might not be available to every user or might depend on a setting (such as Ecommerce) of a site. In such a case you can perform any checks and then return true or false. If your report is only available to users having super user access you can do the following: return Piwik::hasUserSuperUserAccess();
public isEnabled ( ) : boolean
Результат boolean
    public function isEnabled()
    {
        return true;
    }

Usage Example

Пример #1
0
 /**
  * Returns if the default viewDataTable ID to use is fixed.
  *
  * @param Report $report
  * @return bool
  */
 private static function isDefaultViewTypeForReportFixed($report)
 {
     if (!empty($report) && $report->isEnabled()) {
         return $report->alwaysUseDefaultViewDataTable();
     }
     return false;
 }