CRM_Utils_Mail_CaseMail
in package
Class CRM_Utils_Mail_CaseMail.
Table of Contents
Properties
- $caseLabel : string
- A word that is used for cases by default (in email subject).
- $subjectPatterns : array<string|int, mixed>|array<string|int, string>
- Default cases related email subject regexp patterns.
- $subjectPatternsHooked : array<string|int, mixed>|array<string|int, string>
- Cases related email subject regexp patterns extended by hooks.
Methods
- __construct() : mixed
- CRM_Utils_Mail_CaseMail constructor.
- get() : mixed|null
- Returns value of some class property.
- getSubjectPatterns() : array<string|int, mixed>|array<string|int, string>
- Returns cases related email subject patterns.
- isCaseEmail() : bool
- Checks if email is related to cases.
- set() : mixed
- Sets value of some class property.
Properties
$caseLabel
A word that is used for cases by default (in email subject).
private
string
$caseLabel
= 'case'
$subjectPatterns
Default cases related email subject regexp patterns.
private
array<string|int, mixed>|array<string|int, string>
$subjectPatterns
= []
All emails related to cases have case hash/id in the subject, e.g: [case #ab12efg] Magic moment [case #1234] Magic is here This variable is defined in constructor.
$subjectPatternsHooked
Cases related email subject regexp patterns extended by hooks.
private
array<string|int, mixed>|array<string|int, string>
$subjectPatternsHooked
= []
Methods
__construct()
CRM_Utils_Mail_CaseMail constructor.
public
__construct() : mixed
get()
Returns value of some class property.
public
get(string $name) : mixed|null
Parameters
- $name : string
-
Property name.
Return values
mixed|null —Property value or null if property does not exist.
getSubjectPatterns()
Returns cases related email subject patterns.
public
getSubjectPatterns() : array<string|int, mixed>|array<string|int, string>
These patterns could be used to check if email is related to cases.
Return values
array<string|int, mixed>|array<string|int, string>isCaseEmail()
Checks if email is related to cases.
public
isCaseEmail(string $subject) : bool
Parameters
- $subject : string
-
Email subject.
Return values
bool —TRUE if email subject contains case ID or case hash, FALSE otherwise.
set()
Sets value of some class property.
public
set(string $name, mixed $value) : mixed
Parameters
- $name : string
-
Property name.
- $value : mixed
-
New property value.