프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$cache | static cache storing reports |
메소드 | 설명 | |
---|---|---|
__construct ( Psr\Log\LoggerInterface $logger ) | ||
addReport ( integer $idSite, string $description, string $period, integer $hour, string $reportType, string $reportFormat, array $reports, array $parameters, boolean | integer $idSegment = false ) : integer | Creates a new report and schedules it. | |
allowMultipleReports ( $reportType ) | ||
deleteReport ( integer $idReport ) | Deletes a specific report | |
generateReport ( integer $idReport, string $date, boolean | false | string $language = false, boolean | false | integer $outputType = false, boolean | false | string $period = false, boolean | false | string $reportFormat = false, boolean | false | array $parameters = false ) : array | void | Generates a report file. | |
getReportFormats ( $reportType ) | ||
getReportMetadata ( $idSite, $reportType ) | ||
getReportRecipients ( $report ) | ||
getReportTypes ( ) | ||
getReports ( boolean | integer $idSite = false, boolean | string $period = false, boolean | integer $idReport = false, boolean $ifSuperUserReturnOnlySuperUserReports = false, boolean | integer $idSegment = false ) : array | Returns the list of reports matching the passed parameters | |
getSegment ( $idSegment ) | ||
isSegmentEditorActivated ( ) | ||
sendReport ( $idReport, $period = false, $date = false, $force = false ) | ||
updateReport ( $idReport, $idSite, $description, $period, $hour, $reportType, $reportFormat, $reports, $parameters, $idSegment = false ) | Updates an existing report. |
메소드 | 설명 | |
---|---|---|
checkUserHasViewPermission ( $login, $idSite ) | ||
ensureLanguageSetForUser ( $currentUser ) | ||
getAttachments ( $reportRenderer, $report, $processedReports, $prettyDate ) | ||
getModel ( ) | ||
getReportSubjectAndReportTitle ( $websiteName, $reports ) | ||
validateAndTruncateDescription ( &$description ) | ||
validateCommonReportAttributes ( $period, $hour, &$description, &$idSegment, $reportType, $reportFormat ) | ||
validateIdSegment ( &$idSegment ) | ||
validateReportFormat ( $reportType, $reportFormat ) | ||
validateReportHour ( $hour ) | ||
validateReportParameters ( $reportType, $parameters ) | ||
validateReportPeriod ( $period ) | ||
validateReportType ( $reportType ) | ||
validateRequestedReports ( $idSite, $reportType, $requestedReports ) |
public __construct ( Psr\Log\LoggerInterface $logger ) | ||
$logger | Psr\Log\LoggerInterface |
public addReport ( integer $idSite, string $description, string $period, integer $hour, string $reportType, string $reportFormat, array $reports, array $parameters, boolean | integer $idSegment = false ) : integer | ||
$idSite | integer | |
$description | string | Report description |
$period | string | Schedule frequency: day, week or month |
$hour | integer | Hour (0-23) when the report should be sent |
$reportType | string | 'email' or any other format provided via the ScheduledReports.getReportTypes hook |
$reportFormat | string | 'pdf', 'html' or any other format provided via the ScheduledReports.getReportFormats hook |
$reports | array | array of reports |
$parameters | array | array of parameters |
$idSegment | boolean | integer | Segment Identifier |
리턴 | integer | idReport generated |
public deleteReport ( integer $idReport ) | ||
$idReport | integer |
public generateReport ( integer $idReport, string $date, boolean | false | string $language = false, boolean | false | integer $outputType = false, boolean | false | string $period = false, boolean | false | string $reportFormat = false, boolean | false | array $parameters = false ) : array | void | ||
$idReport | integer | ID of the report to generate. |
$date | string | YYYY-MM-DD |
$language | boolean | false | string | If not passed, will use default language. |
$outputType | boolean | false | integer | 1 = download report, 2 = save report to disk, 3 = output report in browser, 4 = return report content to caller, defaults to download |
$period | boolean | false | string | Defaults to 'day'. If not specified, will default to the report's period set when creating the report |
$reportFormat | boolean | false | string | 'pdf', 'html' or any other format provided via the ScheduledReports.getReportFormats hook |
$parameters | boolean | false | array | array of parameters |
리턴 | array | void |
public getReports ( boolean | integer $idSite = false, boolean | string $period = false, boolean | integer $idReport = false, boolean $ifSuperUserReturnOnlySuperUserReports = false, boolean | integer $idSegment = false ) : array | ||
$idSite | boolean | integer | If specified, will filter reports that belong to a specific idsite |
$period | boolean | string | If specified, will filter reports that are scheduled for this period (day,week,month) |
$idReport | boolean | integer | If specified, will filter the report that has the given idReport |
$ifSuperUserReturnOnlySuperUserReports | boolean | |
$idSegment | boolean | integer | If specified, will filter the report that has the given idSegment |
리턴 | array |
public updateReport ( $idReport, $idSite, $description, $period, $hour, $reportType, $reportFormat, $reports, $parameters, $idSegment = false ) |