class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface

Description of a one-way link between two entities

This is a basic SQL foreign key.

Properties

protected $refTable
protected $refKey
protected $refTypeColumn
protected $targetTable
protected $targetKey

Methods

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

No description

getReferenceTable()

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)

No description

array
getReferenceCount(CRM_Core_DAO $targetDao)

No description

Details

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

Parameters

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

at line 33
getReferenceTable()

at line 40
getReferenceKey()

at line 47
null getTypeColumn()

Return Value

null

at line 54
null getTargetTable()

Return Value

null

at line 61
string getTargetKey()

Return Value

string

at line 70
bool matchesTargetTable(string $tableName)

Parameters

string $tableName

Return Value

bool

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

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 105
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