public function toReportsInputFilter($reportsInputFilter = null) { $endUserReportsInputFilter = new endUserReportsInputFilter(); parent::toReportsInputFilter($endUserReportsInputFilter); $endUserReportsInputFilter->application = $this->application; $endUserReportsInputFilter->userIds = $this->userIds; $endUserReportsInputFilter->playbackContext = $this->playbackContext; $endUserReportsInputFilter->ancestorPlaybackContext = $this->ancestorPlaybackContext; return $endUserReportsInputFilter; }
public function toReportsInputFilter($reportsInputFilter = null) { $endUserReportsInputFilter = new endUserReportsInputFilter(); parent::toReportsInputFilter($endUserReportsInputFilter); $endUserReportsInputFilter->application = $this->application; $endUserReportsInputFilter->userIds = $this->userIds; $endUserReportsInputFilter->playbackContext = $this->playbackContext; if ($this->application != null) { $endUserReportsInputFilter->extra_map[self::APPLICATION_NAME_PLACE_HOLDER] = "'" . $this->application . "'"; } if ($this->userIds != null) { $objectIds = explode(',', $this->userIds); $puserIds = "('" . implode("','", $objectIds) . "')"; // replace puser_id '0' with 'Unknown' as it saved on dwh pusers table $puserIds = str_replace(self::UNKNOWN_PUSER_ID_CLAUSE, self::UNKNOWN_NAME_CLAUSE, $puserIds); $endUserReportsInputFilter->extra_map[self::PUSERS_PLACE_HOLDER] = $puserIds; } return $endUserReportsInputFilter; }
/** * * will create a Csv file for the given report and return the URL to access it * @action getUrlForReportAsCsv * * @param string $reportTitle The title of the report to display at top of CSV * @param string $reportText The text of the filter of the report * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text * @param KalturaReportType $reportType * @param KalturaReportInputFilter $reportInputFilter * @param string $dimension * @param KalturaFilterPager $pager * @param KalturaReportType $reportType * @param string $order * @param string $objectIds - one ID or more (separated by ',') of specific objects to query * @return string */ public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null) { if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) { $objectIds = $this->validateObjectsAreAllowedPartners($objectIds); } $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order); return $report; }
/** * * will create a Csv file for the given report and return the URL to access it * @action getUrlForReportAsCsv * * @param string $reportTitle The title of the report to display at top of CSV * @param string $reportText The text of the filter of the report * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text * @param KalturaReportType $reportType * @param KalturaReportInputFilter $reportInputFilter * @param string $dimension * @param KalturaFilterPager $pager * @param KalturaReportType $reportType * @param string $order * @param string $objectIds - one ID or more (separated by ',') of specific objects to query * @return string */ public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null) { if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) { $objectIds = $this->validateObjectsAreAllowedPartners($objectIds); } try { $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order); } catch (Exception $e) { $code = $e->getCode(); if ($code == kCoreException::SEARCH_TOO_GENERAL) { throw new KalturaAPIException(KalturaErrors::SEARCH_TOO_GENERAL); } } if (infraRequestUtils::getProtocol() == infraRequestUtils::PROTOCOL_HTTPS) { $report = str_replace("http://", "https://", $report); } return $report; }
/** * * will create a Csv file for the given report and return the URL to access it * @action getUrlForReportAsCsv * * @param string $reportTitle The title of the report to display at top of CSV * @param string $reportText The text of the filter of the report * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text * @param KalturaReportType $reportType * @param KalturaReportInputFilter $reportInputFilter * @param string $dimension * @param KalturaFilterPager $pager * @param KalturaReportType $reportType * @param string $order * @param string $objectIds - one ID or more (separated by ',') of specific objects to query * @return string */ function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null) { return myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order); }