Documentation

CRM_Case_XMLRepository
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing The XMLRepository is responsible for loading XML for case-types. It includes any bulk operations that apply across the list of all XML documents of all case-types.

Table of Contents

Properties

$hookCache  : array<string|int, mixed>|null
$unitTestCaseTypes  : array<string|int, mixed>|null
Override case types, only used by unit tests
$xml  : array<string|int, mixed>
$singleton  : mixed

Methods

__construct()  : mixed
Class constructor.
findXmlFile()  : null|string
Find xml file.
flush()  : mixed
getActivityReferenceCount()  : int
Determine the number of times a particular activity-type is referenced in CiviCase XML.
getAllCaseTypes()  : array<string|int, string>
getAllDeclaredActivityTypes()  : array<string|int, string>
getAllDeclaredRelationshipTypes()  : array<string|int, string>
Relationships are straight from XML, described from perspective of non-client
getCaseTypesViaHook()  : array<string|int, mixed>
getRelationshipReferenceCount()  : int
Determine the number of times a particular activity-type is referenced in CiviCase XML.
retrieve()  : false|SimpleXMLElement
Retrieve case.
retrieveFile()  : SimpleXMLElement|false
Retrieve file.
singleton()  : CRM_Case_XMLRepository

Properties

$hookCache

protected array<string|int, mixed>|null $hookCache = \NULL

$unitTestCaseTypes

Override case types, only used by unit tests

protected array<string|int, mixed>|null $unitTestCaseTypes = \NULL

$xml

protected array<string|int, mixed> $xml = []

<String,SimpleXMLElement>

Methods

__construct()

Class constructor.

public __construct([array<string|int, mixed> $unitTestCaseTypes = NULL ][, array<string|int, mixed> $xml = [] ]) : mixed
Parameters
$unitTestCaseTypes : array<string|int, mixed> = NULL
$xml : array<string|int, mixed> = []

findXmlFile()

Find xml file.

public findXmlFile(string $caseType) : null|string
Parameters
$caseType : string
Return values
null|string

file path

getActivityReferenceCount()

Determine the number of times a particular activity-type is referenced in CiviCase XML.

public getActivityReferenceCount(string $activityType) : int
Parameters
$activityType : string

Symbolic-name of an activity type.

Return values
int

getAllCaseTypes()

public getAllCaseTypes() : array<string|int, string>
Return values
array<string|int, string>

symbolic names of case-types

getAllDeclaredActivityTypes()

public getAllDeclaredActivityTypes() : array<string|int, string>
Return values
array<string|int, string>

symbolic-names of activity-types

getAllDeclaredRelationshipTypes()

Relationships are straight from XML, described from perspective of non-client

public getAllDeclaredRelationshipTypes() : array<string|int, string>
Return values
array<string|int, string>

symbolic-names of relationship-types

getCaseTypesViaHook()

public getCaseTypesViaHook() : array<string|int, mixed>
Tags
see
CRM_Utils_Hook::caseTypes
Return values
array<string|int, mixed>

getRelationshipReferenceCount()

Determine the number of times a particular activity-type is referenced in CiviCase XML.

public getRelationshipReferenceCount(string $relationshipTypeName) : int
Parameters
$relationshipTypeName : string

Symbolic-name of a relationship-type.

Return values
int

retrieve()

Retrieve case.

public retrieve(string $caseType) : false|SimpleXMLElement
Parameters
$caseType : string
Tags
throws
CRM_Core_Exception
Return values
false|SimpleXMLElement

retrieveFile()

Retrieve file.

public retrieveFile(string $caseType) : SimpleXMLElement|false
Parameters
$caseType : string
Return values
SimpleXMLElement|false

        
On this page

Search results