Documentation

CRM_Report_Utils_Report
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Methods

export2csv()  : mixed
getInstanceCount()  : int|null|string
get instance count for a template.
getInstanceID()  : mixed
getInstanceIDForPath()  : mixed
getInstanceIDForValue()  : mixed
getInstanceList()  : mixed
getInstancePath()  : string
getNextUrl()  : bool|string
getPreviewCriteriaQueryParams()  : string
Build a URL query string containing all report filter criteria that are stipulated in $_GET or in a report Preview, but which haven't yet been saved in the report instance.
getValueFromUrl()  : null|string
getValueIDFromUrl()  : array<string|int, mixed>|bool
isInstanceGroupRoleAllowed()  : bool
Check if the user can view a report instance based on their role(s)
isInstancePermissioned()  : bool
mailReport()  : bool
makeCsv()  : string
Utility function for export2csv and CRM_Report_Form::endPostProcess - make CSV file content and return as string.
processReport()  : array<string|int, mixed>

Methods

export2csv()

public static export2csv(CRM_Core_Form &$form, array<string|int, mixed> &$rows) : mixed
Parameters
$form : CRM_Core_Form
$rows : array<string|int, mixed>

getInstanceCount()

get instance count for a template.

public static getInstanceCount(string $optionVal) : int|null|string
Parameters
$optionVal : string
Return values
int|null|string

getInstanceID()

public static getInstanceID() : mixed

getInstanceIDForPath()

public static getInstanceIDForPath([null $path = NULL ]) : mixed
Parameters
$path : null = NULL

getInstanceIDForValue()

public static getInstanceIDForValue(string $optionVal) : mixed
Parameters
$optionVal : string

getInstanceList()

public static getInstanceList(string $reportUrl) : mixed
Parameters
$reportUrl : string

getInstancePath()

public static getInstancePath() : string
Return values
string

getNextUrl()

public static getNextUrl(string $urlValue[, string $query = 'reset=1' ][, bool $absolute = FALSE ][, int $instanceID = NULL ][, array<string|int, mixed> $drilldownReport = [] ]) : bool|string
Parameters
$urlValue : string
$query : string = 'reset=1'
$absolute : bool = FALSE
$instanceID : int = NULL
$drilldownReport : array<string|int, mixed> = []
Return values
bool|string

getPreviewCriteriaQueryParams()

Build a URL query string containing all report filter criteria that are stipulated in $_GET or in a report Preview, but which haven't yet been saved in the report instance.

public static getPreviewCriteriaQueryParams([array<string|int, mixed> $defaults = [] ][, array<string|int, mixed> $params = [] ]) : string
Parameters
$defaults : array<string|int, mixed> = []

The report criteria that aren't coming in as submitted form values, as in CRM_Report_Form::_defaults.

$params : array<string|int, mixed> = []

All effective report criteria, as in CRM_Report_Form::_params.

Return values
string

URL query string

getValueFromUrl()

public static getValueFromUrl([int $instanceID = NULL ]) : null|string
Parameters
$instanceID : int = NULL
Return values
null|string

getValueIDFromUrl()

public static getValueIDFromUrl([int $instanceID = NULL ]) : array<string|int, mixed>|bool
Parameters
$instanceID : int = NULL
Return values
array<string|int, mixed>|bool

isInstanceGroupRoleAllowed()

Check if the user can view a report instance based on their role(s)

public static isInstanceGroupRoleAllowed(int $instanceId) : bool
Parameters
$instanceId : int
Tags
instanceId

string $str the report instance to check

Return values
bool

true if yes, else false

isInstancePermissioned()

public static isInstancePermissioned(int $instanceId) : bool
Parameters
$instanceId : int
Return values
bool

mailReport()

public static mailReport(mixed $fileContent[, int $instanceID = NULL ][, string $outputMode = 'html' ][, array<string|int, mixed> $attachments = [] ]) : bool
Parameters
$fileContent : mixed
$instanceID : int = NULL
$outputMode : string = 'html'
$attachments : array<string|int, mixed> = []
Return values
bool

makeCsv()

Utility function for export2csv and CRM_Report_Form::endPostProcess - make CSV file content and return as string.

public static makeCsv(CRM_Core_Form &$form, array<string|int, mixed> &$rows) : string
Parameters
$form : CRM_Core_Form
$rows : array<string|int, mixed>
Return values
string

processReport()

public static processReport(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results