Documentation

RelationInterface
in

Relation interface class.

Table of Contents

create()  : bool
Create relation.
delete()  : bool
Delete relation.
getQuery()  : mixed
Function adds relation conditions to query object.
getRelationType()  : int
Get relation type.
transfer()  : bool
Function moves related records from source to target.

Methods

create()

Create relation.

public create(int $sourceRecordId, int $destinationRecordId) : bool
Parameters
$sourceRecordId : int

Specifies parent record ID where we add relation

$destinationRecordId : int

Specifies record ID from related module. This record will appear on the list of parent module's related records

Return values
bool

delete()

Delete relation.

public delete(int $sourceRecordId, int $destinationRecordId) : bool
Parameters
$sourceRecordId : int

Specifies parent record ID from where we remove relation

$destinationRecordId : int

Specifies record ID from related module. This record will disappear from the list of parent module's related records

Return values
bool

getQuery()

Function adds relation conditions to query object.

public getQuery() : mixed
Return values
mixed

getRelationType()

Get relation type.

public getRelationType() : int
Return values
int

transfer()

Function moves related records from source to target.

public transfer(int $relatedRecordId, int $fromRecordId, int $toRecordId) : bool
Parameters
$relatedRecordId : int
$fromRecordId : int
$toRecordId : int
Return values
bool

        

Search results