class CRM_Core_Reference_Dynamic extends CRM_Core_Reference_Basic

Description of a one-way link between two entities

This is a generic, soft-foreign key based on a pair of columns (entity_id, entity_table).

Properties

protected $refTable from CRM_Core_Reference_Basic
protected $refKey from CRM_Core_Reference_Basic
protected $refTypeColumn from CRM_Core_Reference_Basic
protected $targetTable from CRM_Core_Reference_Basic
protected $targetKey from CRM_Core_Reference_Basic

Methods

__construct($refTable, $refKey, null $targetTable = NULL, string $targetKey = 'id', null $refTypeColumn = NULL)

No description

getReferenceKey()

No description

null
getTypeColumn()

No description

null
getTargetTable()

No description

string
getTargetKey()

No description

bool
matchesTargetTable(string $tableName)

No description

findReferences(CRM_Core_DAO $targetDao)

Create a query to find references to a particular record.

array
getReferenceCount(CRM_Core_DAO $targetDao)

No description

Details

__construct($refTable, $refKey, null $targetTable = NULL, string $targetKey = 'id', null $refTypeColumn = NULL)

Parameters

$refTable
$refKey
null $targetTable
string $targetKey
null $refTypeColumn

getReferenceTable()

getReferenceKey()

null getTypeColumn()

Return Value

null

null getTargetTable()

Return Value

null

string getTargetKey()

Return Value

string

at line 15
bool matchesTargetTable(string $tableName)

Parameters

string $tableName

Return Value

bool

at line 27
CRM_Core_DAO|NULL findReferences(CRM_Core_DAO $targetDao)

Create a query to find references to a particular record.

Parameters

CRM_Core_DAO $targetDao The instance for which we want references.

Return Value

CRM_Core_DAO|NULL a query-handle (like the result of CRM_Core_DAO::executeQuery)

at line 55
array getReferenceCount(CRM_Core_DAO $targetDao)

Parameters

CRM_Core_DAO $targetDao The instance for which we want references.

Return Value

array a record describing the reference; must include the keys: - 'type': string (not necessarily unique) - 'count': int