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

public getReportMetadataByUniqueId ( $idSite, $apiMethodUniqueId )
Пример #1
0
 public function getReportByUniqueId($idSite, $reportUniqueId)
 {
     $processedReport = new ProcessedReport();
     $report = $processedReport->getReportMetadataByUniqueId($idSite, $reportUniqueId);
     return $report;
 }
Пример #2
0
 public function getReportByUniqueId($idSite, $reportUniqueId)
 {
     $report = $this->processedReport->getReportMetadataByUniqueId($idSite, $reportUniqueId);
     return $report;
 }
 private function findReportMetadata($alert)
 {
     $idSite = $this->findSiteId($alert);
     if (empty($idSite)) {
         return;
     }
     $processedReport = new ProcessedReport();
     $report = $processedReport->getReportMetadataByUniqueId($idSite, $alert['report']);
     return $report;
 }
 /**
  * @param  array  $alert
  * @param  int    $idSite
  * @param  int    $subPeriodN
  *
  * @return array
  */
 public function getValueForAlertInPast($alert, $idSite, $subPeriodN)
 {
     $processedReport = new ProcessedReport();
     $report = $processedReport->getReportMetadataByUniqueId($idSite, $alert['report']);
     $dateInPast = $this->getDateForAlertInPast($idSite, $alert['period'], $subPeriodN);
     $params = array('method' => $report['module'] . '.' . $report['action'], 'format' => 'original', 'idSite' => $idSite, 'period' => $alert['period'], 'date' => $dateInPast, 'flat' => 1, 'disable_queued_filters' => 1, 'filter_limit' => -1);
     if (!empty($report['parameters'])) {
         $params = array_merge($params, $report['parameters']);
     }
     $subtableId = DataTable\Manager::getInstance()->getMostRecentTableId();
     $request = new ApiRequest($params);
     $table = $request->process();
     $value = $this->aggregateToOneValue($table, $alert['metric'], $alert['report_condition'], $alert['report_matched']);
     DataTable\Manager::getInstance()->deleteAll($subtableId);
     return $value;
 }