getMetadata() public méthode

Loads reports metadata, then return the requested one, matching optional API parameters.
public getMetadata ( $idSite, $apiModule, $apiAction, $apiParameters = [], $language = false, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false )
Exemple #1
0
 /**
  * Loads reports metadata, then return the requested one,
  * matching optional API parameters.
  */
 public function getMetadata($idSite, $apiModule, $apiAction, $apiParameters = array(), $language = false, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false)
 {
     Piwik::checkUserHasViewAccess($idSite);
     if ($language) {
         /** @var Translator $translator */
         $translator = StaticContainer::get('Piwik\\Translation\\Translator');
         $translator->setCurrentLanguage($language);
     }
     $metadata = $this->processedReport->getMetadata($idSite, $apiModule, $apiAction, $apiParameters, $language, $period, $date, $hideMetricsDoc, $showSubtableReports);
     return $metadata;
 }
Exemple #2
0
 /**
  * Loads reports metadata, then return the requested one,
  * matching optional API parameters.
  */
 public function getMetadata($idSite, $apiModule, $apiAction, $apiParameters = array(), $language = false, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false)
 {
     Translate::reloadLanguage($language);
     $reporter = new ProcessedReport();
     $metadata = $reporter->getMetadata($idSite, $apiModule, $apiAction, $apiParameters, $language, $period, $date, $hideMetricsDoc, $showSubtableReports);
     return $metadata;
 }