Documentation

CRM_Core_Reference_Basic
in package
implements CRM_Core_Reference_Interface

Description of a one-way link between two entities

This is a basic SQL foreign key.

Table of Contents

Interfaces

CRM_Core_Reference_Interface
Interface CRM_Core_Reference_Interface

Properties

$refKey  : mixed
$refTable  : mixed
$refTypeColumn  : mixed
$targetKey  : mixed
$targetTable  : mixed

Methods

__construct()  : mixed
findReferences()  : object
Create a query to find references to a particular record.
getReferenceCount()  : array<string|int, mixed>
Create a query to find references to a particular record.
getReferenceKey()  : string
getReferenceTable()  : string
getTargetEntities()  : array<string|int, mixed>
getTargetKey()  : string
getTargetTable()  : string
getTypeColumn()  : string|null
CRM_Core_Reference_Basic returns NULL.
matchesTargetTable()  : bool
Determine if a given table is a target of this reference.

Properties

$refKey

protected mixed $refKey

$refTable

protected mixed $refTable

$refTypeColumn

protected mixed $refTypeColumn

$targetKey

protected mixed $targetKey

$targetTable

protected mixed $targetTable

Methods

__construct()

public __construct(string $refTable, string $refKey[, string $targetTable = NULL ][, string $targetKey = 'id' ][, string|null $refTypeColumn = NULL ]) : mixed
Parameters
$refTable : string
$refKey : string
$targetTable : string = NULL
$targetKey : string = 'id'
$refTypeColumn : string|null = NULL

findReferences()

Create a query to find references to a particular record.

public findReferences(CRM_Core_DAO $targetDao) : object
Parameters
$targetDao : CRM_Core_DAO
Return values
object

getReferenceCount()

Create a query to find references to a particular record.

public getReferenceCount(CRM_Core_DAO $targetDao) : array<string|int, mixed>
Parameters
$targetDao : CRM_Core_DAO
Return values
array<string|int, mixed>

getReferenceKey()

public getReferenceKey() : string
Return values
string

getReferenceTable()

public getReferenceTable() : string
Return values
string

getTargetEntities()

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

[table_name => EntityName]

getTargetKey()

public getTargetKey() : string
Return values
string

getTargetTable()

public getTargetTable() : string
Return values
string

getTypeColumn()

CRM_Core_Reference_Basic returns NULL.

public getTypeColumn() : string|null

CRM_Core_Reference_Dynamic returns the name of the dynamic column e.g. "entity_table".

Return values
string|null

matchesTargetTable()

Determine if a given table is a target of this reference.

public matchesTargetTable(string $tableName) : bool
Parameters
$tableName : string
Return values
bool

        
On this page

Search results