CRM_Case_XMLProcessor_Process
extends CRM_Case_XMLProcessor
in package
Tags
Table of Contents
Properties
- $_isMultiClient : bool
- Does Cases support Multiple Clients.
- $defaultAssigneeOptionsValues : mixed
Methods
- activitySets() : array<string|int, mixed>
- activityTypes() : array<string|int, mixed>
- allRelationshipTypes() : array<string|int, mixed>
- Get all relationship type display labels (not machine names)
- caseRoles() : array<string|int, mixed>|mixed
- createActivity() : bool
- createRelationships() : bool
- deleteEmptyActivity() : mixed
- flushStaticCaches() : mixed
- FIXME: This should not exist
- get() : array<string|int, mixed>|bool|mixed
- getAllowMultipleCaseClients() : string
- Retrieves AllowMultipleCaseClients setting.
- getCaseManagerRoleId() : array<string|int, mixed>|mixed
- getDeclaredActivityTypes() : array<string|int, string>
- getDeclaredRelationshipTypes() : array<string|int, string>
- Relationships are straight from XML, described from perspective of non-client
- getListeners() : array<string|int, CaseChangeListener>
- getMaxInstance() : array<string|int, mixed>|bool|mixed
- getNaturalActivityTypeSort() : string
- Retrieves NaturalActivityTypeSort setting.
- getRedactActivityEmail() : int
- isActivityPresent() : bool
- locateNameOrLabel() : mixed
- At some point name and label got mixed up for case roles.
- mungeCaseType() : string
- This function was previously used to convert a case-type's machine-name to a file-name. However, it's mind-boggling that the file-name might be a munged version of the machine-name (which is itself a munged version of the display-name), and naming is now a more visible issue (since the overhaul of CaseType admin UI).
- process() : mixed
- processActivitySet() : mixed
- processStandardTimeline() : mixed
- retrieve() : false|SimpleXMLElement
- run() : mixed
- Run.
- getDefaultAssigneeByRelationship() : int|null
- Returns the default assignee for the activity by searching for the target's contact relationship type defined in the activity's details.
- getDefaultAssigneeBySpecificContact() : int|null
- Returns the activity's default assignee for a specific contact if the contact exists, otherwise returns null.
- getDefaultAssigneeForActivity() : int|null
- Return the default assignee contact for the activity.
- getDefaultAssigneeOptionValues() : array<string|int, mixed>
- Fetches and caches the activity's default assignee options.
- isBidirectionalRelationshipType() : bool
- Determines if the given relationship type is bidirectional or not by comparing their labels.
- getBoolSetting() : int
Properties
$_isMultiClient
Does Cases support Multiple Clients.
public
bool
$_isMultiClient
= \FALSE
$defaultAssigneeOptionsValues
protected
mixed
$defaultAssigneeOptionsValues
= []
Methods
activitySets()
public
static activitySets(mixed $activitySetsXML) : array<string|int, mixed>
Parameters
- $activitySetsXML : mixed
Return values
array<string|int, mixed>activityTypes()
public
activityTypes(mixed $activityTypesXML[, bool $maxInst = FALSE ][, bool $isLabel = FALSE ][, bool $maskAction = FALSE ]) : array<string|int, mixed>
Parameters
- $activityTypesXML : mixed
- $maxInst : bool = FALSE
- $isLabel : bool = FALSE
- $maskAction : bool = FALSE
Return values
array<string|int, mixed>allRelationshipTypes()
Get all relationship type display labels (not machine names)
public
& allRelationshipTypes([bool $fromXML = FALSE ]) : array<string|int, mixed>
Parameters
- $fromXML : bool = FALSE
-
TODO: This parameter is always FALSE now so no longer needed. Is this to be used for lookup of values from XML? Relationships are recorded in XML from the perspective of the non-client while relationships in the UI and everywhere else are from the perspective of the client. Since the XML can't be expected to be switched, the direction needs to be translated.
Return values
array<string|int, mixed>caseRoles()
public
& caseRoles(mixed $caseRolesXML[, bool $isCaseManager = FALSE ]) : array<string|int, mixed>|mixed
Parameters
- $caseRolesXML : mixed
- $isCaseManager : bool = FALSE
Return values
array<string|int, mixed>|mixedcreateActivity()
public
createActivity(mixed $activityTypeXML, array<string|int, mixed> &$params) : bool
Parameters
- $activityTypeXML : mixed
- $params : array<string|int, mixed>
Tags
Return values
boolcreateRelationships()
public
createRelationships(SimpleXMLElement $relationshipTypeXML, array<string|int, mixed> $params) : bool
Parameters
- $relationshipTypeXML : SimpleXMLElement
- $params : array<string|int, mixed>
Tags
Return values
booldeleteEmptyActivity()
public
deleteEmptyActivity(array<string|int, mixed> &$params) : mixed
Parameters
- $params : array<string|int, mixed>
flushStaticCaches()
FIXME: This should not exist
public
static flushStaticCaches() : mixed
get()
public
get(mixed $caseType, mixed $fieldSet[, bool $isLabel = FALSE ][, bool $maskAction = FALSE ]) : array<string|int, mixed>|bool|mixed
Parameters
- $caseType : mixed
- $fieldSet : mixed
- $isLabel : bool = FALSE
- $maskAction : bool = FALSE
Tags
Return values
array<string|int, mixed>|bool|mixedgetAllowMultipleCaseClients()
Retrieves AllowMultipleCaseClients setting.
public
getAllowMultipleCaseClients() : string
Return values
string —1 if allowed, 0 if not
getCaseManagerRoleId()
public
getCaseManagerRoleId(mixed $caseType) : array<string|int, mixed>|mixed
Parameters
- $caseType : mixed
Return values
array<string|int, mixed>|mixedgetDeclaredActivityTypes()
public
getDeclaredActivityTypes(SimpleXMLElement $caseTypeXML) : array<string|int, string>
Parameters
- $caseTypeXML : SimpleXMLElement
Return values
array<string|int, string> —symbolic activity-type names
getDeclaredRelationshipTypes()
Relationships are straight from XML, described from perspective of non-client
public
getDeclaredRelationshipTypes(SimpleXMLElement $caseTypeXML) : array<string|int, string>
Parameters
- $caseTypeXML : SimpleXMLElement
Return values
array<string|int, string> —symbolic relationship-type names
getListeners()
public
getListeners(string $caseType) : array<string|int, CaseChangeListener>
Parameters
- $caseType : string
Return values
array<string|int, CaseChangeListener>getMaxInstance()
public
getMaxInstance(mixed $caseType[, string|null $activityTypeName = NULL ]) : array<string|int, mixed>|bool|mixed
Parameters
- $caseType : mixed
- $activityTypeName : string|null = NULL
Tags
Return values
array<string|int, mixed>|bool|mixedgetNaturalActivityTypeSort()
Retrieves NaturalActivityTypeSort setting.
public
getNaturalActivityTypeSort() : string
Return values
string —1 if natural, 0 if alphabetic
getRedactActivityEmail()
public
getRedactActivityEmail() : int
Return values
intisActivityPresent()
public
isActivityPresent(array<string|int, mixed> &$params) : bool
Parameters
- $params : array<string|int, mixed>
Return values
boollocateNameOrLabel()
At some point name and label got mixed up for case roles.
public
locateNameOrLabel(SimpleXMLElement $xml) : mixed
Check against known machine name values, and then if no match check against labels. This is subject to some edge cases, but we catch those with a system status check. We do this to avoid requiring people to update their xml files which can be stored in external files we can't/don't want to edit.
Parameters
- $xml : SimpleXMLElement
Tags
mungeCaseType()
This function was previously used to convert a case-type's machine-name to a file-name. However, it's mind-boggling that the file-name might be a munged version of the machine-name (which is itself a munged version of the display-name), and naming is now a more visible issue (since the overhaul of CaseType admin UI).
public
static mungeCaseType(string $caseType) : string
Usage note: This is called externally by civix stubs as a sort of side-ways validation of the case-type's name (validation which was needed because of the unintuitive double-munge). We should update civix templates and then remove this function in Civi 4.6 or 5.0.
Parameters
- $caseType : string
Tags
Return values
stringprocess()
public
process(SimpleXMLElement $xml, array<string|int, mixed> &$params) : mixed
Parameters
- $xml : SimpleXMLElement
- $params : array<string|int, mixed>
Tags
processActivitySet()
public
processActivitySet(mixed $activitySetXML, array<string|int, mixed> &$params) : mixed
Parameters
- $activitySetXML : mixed
- $params : array<string|int, mixed>
processStandardTimeline()
public
processStandardTimeline(mixed $activitySetXML, array<string|int, mixed> &$params) : mixed
Parameters
- $activitySetXML : mixed
- $params : array<string|int, mixed>
retrieve()
public
retrieve(mixed $caseType) : false|SimpleXMLElement
Parameters
- $caseType : mixed
Return values
false|SimpleXMLElementrun()
Run.
public
run(string $caseType, array<string|int, mixed> &$params) : mixed
Parameters
- $caseType : string
- $params : array<string|int, mixed>
Tags
getDefaultAssigneeByRelationship()
Returns the default assignee for the activity by searching for the target's contact relationship type defined in the activity's details.
protected
getDefaultAssigneeByRelationship(array<string|int, mixed> $activityParams, object $activityTypeXML, int $caseId) : int|null
Parameters
- $activityParams : array<string|int, mixed>
- $activityTypeXML : object
- $caseId : int
Return values
int|null —the ID of the default assignee contact or null if none.
getDefaultAssigneeBySpecificContact()
Returns the activity's default assignee for a specific contact if the contact exists, otherwise returns null.
protected
getDefaultAssigneeBySpecificContact(object $activityTypeXML) : int|null
Parameters
- $activityTypeXML : object
Return values
int|nullgetDefaultAssigneeForActivity()
Return the default assignee contact for the activity.
protected
getDefaultAssigneeForActivity(array<string|int, mixed> $activityParams, object $activityTypeXML, int $caseId) : int|null
Parameters
- $activityParams : array<string|int, mixed>
- $activityTypeXML : object
- $caseId : int
Return values
int|null —the ID of the default assignee contact or null if none.
getDefaultAssigneeOptionValues()
Fetches and caches the activity's default assignee options.
protected
getDefaultAssigneeOptionValues() : array<string|int, mixed>
Return values
array<string|int, mixed>isBidirectionalRelationshipType()
Determines if the given relationship type is bidirectional or not by comparing their labels.
protected
isBidirectionalRelationshipType(mixed $relationshipTypeId) : bool
Parameters
- $relationshipTypeId : mixed
Return values
boolgetBoolSetting()
private
getBoolSetting(string $settingKey, string $xmlTag[, mixed $default = 0 ]) : int
Parameters
- $settingKey : string
- $xmlTag : string
- $default : mixed = 0