ManyToMany extends Relation
Performs many to many relation through mediator entity
Tags
Table of Contents
Methods
- __construct() : mixed
- addFetchDataModifier() : $this
- addSaveDataModifier() : $this
- addValidator() : $this
- configureCascadeDeletePolicy() : Relation
- configureCascadeSavePolicy() : Relation
- configureJoinType() : $this
- configureLocalPrimary() : $this
- In case of auto-generated mediator, sets the custom ID field name that stores owner entity ID.
- configureLocalReference() : $this
- In case of auto-generated mediator, sets the custom reference field name that points to owner entity.
- configureMediatorEntity() : $this
- Explicit mediator entity. By default will be generated automatically.
- configureMediatorTableName() : $this
- In case of auto-generated mediator, sets the custom table name.
- configureRemotePrimary() : $this
- In case of auto-generated mediator, sets the custom ID field name that stores target entity ID.
- configureRemoteReference() : $this
- In case of auto-generated mediator, sets the custom reference field name that points to target entity.
- configureSerialized() : $this
- configureTableName() : $this
- Short alias for configureMediatorTableName()
- configureTitle() : $this
- Lang phrase
- getCascadeDeletePolicy() : int
- getCascadeSavePolicy() : int
- getClassByOldDataType() : bool
- getConnection() : Connection
- getDataType() : null|string
- getEntity() : mixed
- getFetchDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
- getGetterTypeHint() : EntityObject|string
- getJoinType() : string
- getLangCode() : mixed
- getLocalReference() : Reference|Field
- Returns reference from mediator to owner entity
- getLocalReferenceName() : string
- getMediatorEntity() : Entity
- getName() : mixed
- getOldDataTypeByClass() : bool
- getOldDataTypeByField() : bool
- getParameter() : mixed
- getParentField() : Field
- getRefEntity() : Entity
- getRefEntityName() : string
- getRemoteEntity() : Entity
- getRemoteReference() : Reference|Field
- Returns reference from mediator to target entity
- getRemoteReferenceName() : string
- getSaveDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
- getSetterTypeHint() : EntityObject|string
- getTitle() : mixed
- getTypeMask() : mixed
- getValidators() : array<string|int, callable>|array<string|int, Validator>
- hasParameter() : mixed
- isSerialized() : bool
- modifyValueBeforeSave() : mixed
- postInitialize() : null
- Called after being initialized by Entity
- resetEntity() : mixed
- serialize() : mixed
- setConnection() : mixed
- setEntity() : mixed
- setName() : mixed
- setParameter() : mixed
- setParentField() : mixed
- setSerialized() : mixed
- unserialize() : mixed
- validateValue() : Result
Methods
__construct()
public
__construct(string $name, string|Entity $referenceEntity) : mixed
Parameters
- $name : string
- $referenceEntity : string|Entity
Tags
addFetchDataModifier()
public
addFetchDataModifier(callable $modifier) : $this
Parameters
- $modifier : callable
Tags
Return values
$thisaddSaveDataModifier()
public
addSaveDataModifier(callable $modifier) : $this
Parameters
- $modifier : callable
Tags
Return values
$thisaddValidator()
public
addValidator(Validator|callable $validator) : $this
Parameters
- $validator : Validator|callable
Tags
Return values
$thisconfigureCascadeDeletePolicy()
public
configureCascadeDeletePolicy(int $cascadeDeletePolicy) : Relation
Parameters
- $cascadeDeletePolicy : int
Return values
RelationconfigureCascadeSavePolicy()
public
configureCascadeSavePolicy(int $cascadeSavePolicy) : Relation
Parameters
- $cascadeSavePolicy : int
Return values
RelationconfigureJoinType()
public
configureJoinType(mixed $type) : $this
Parameters
- $type : mixed
Tags
Return values
$thisconfigureLocalPrimary()
In case of auto-generated mediator, sets the custom ID field name that stores owner entity ID.
public
configureLocalPrimary(mixed $fieldName, mixed $mediatorFieldName) : $this
Parameters
- $fieldName : mixed
- $mediatorFieldName : mixed
Return values
$thisconfigureLocalReference()
In case of auto-generated mediator, sets the custom reference field name that points to owner entity.
public
configureLocalReference(mixed $name) : $this
Parameters
- $name : mixed
Return values
$thisconfigureMediatorEntity()
Explicit mediator entity. By default will be generated automatically.
public
configureMediatorEntity(string|Entity $entity) : $this
Parameters
- $entity : string|Entity
Return values
$thisconfigureMediatorTableName()
In case of auto-generated mediator, sets the custom table name.
public
configureMediatorTableName(mixed $name) : $this
Parameters
- $name : mixed
Return values
$thisconfigureRemotePrimary()
In case of auto-generated mediator, sets the custom ID field name that stores target entity ID.
public
configureRemotePrimary(mixed $fieldName, mixed $mediatorFieldName) : $this
Parameters
- $fieldName : mixed
- $mediatorFieldName : mixed
Return values
$thisconfigureRemoteReference()
In case of auto-generated mediator, sets the custom reference field name that points to target entity.
public
configureRemoteReference(mixed $name) : $this
Parameters
- $name : mixed
Return values
$thisconfigureSerialized()
public
configureSerialized() : $this
Tags
Return values
$thisconfigureTableName()
Short alias for configureMediatorTableName()
public
configureTableName(mixed $name) : $this
Parameters
- $name : mixed
Return values
$thisconfigureTitle()
Lang phrase
public
configureTitle(mixed $title) : $this
Parameters
- $title : mixed
Return values
$thisgetCascadeDeletePolicy()
public
getCascadeDeletePolicy() : int
Return values
intgetCascadeSavePolicy()
public
getCascadeSavePolicy() : int
Return values
intgetClassByOldDataType()
public
static getClassByOldDataType(mixed $dateType) : bool
Parameters
- $dateType : mixed
Return values
boolgetConnection()
public
getConnection() : Connection
Tags
Return values
ConnectiongetDataType()
public
getDataType() : null|string
Return values
null|stringgetEntity()
public
getEntity() : mixed
getFetchDataModifiers()
public
getFetchDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
Return values
array<string|int, mixed>|array<string|int, callable>|nullgetGetterTypeHint()
public
getGetterTypeHint() : EntityObject|string
Tags
Return values
EntityObject|stringgetJoinType()
public
getJoinType() : string
Return values
stringgetLangCode()
public
getLangCode() : mixed
getLocalReference()
Returns reference from mediator to owner entity
public
getLocalReference() : Reference|Field
Tags
Return values
Reference|FieldgetLocalReferenceName()
public
getLocalReferenceName() : string
Return values
stringgetMediatorEntity()
public
getMediatorEntity() : Entity
Tags
Return values
EntitygetName()
public
getName() : mixed
getOldDataTypeByClass()
public
static getOldDataTypeByClass(mixed $class) : bool
Parameters
- $class : mixed
Return values
boolgetOldDataTypeByField()
public
static getOldDataTypeByField(Field $field) : bool
Parameters
- $field : Field
Return values
boolgetParameter()
public
getParameter(mixed $name) : mixed
Parameters
- $name : mixed
getParentField()
public
getParentField() : Field
Return values
FieldgetRefEntity()
public
getRefEntity() : Entity
Tags
Return values
EntitygetRefEntityName()
public
getRefEntityName() : string
Return values
stringgetRemoteEntity()
public
getRemoteEntity() : Entity
Tags
Return values
EntitygetRemoteReference()
Returns reference from mediator to target entity
public
getRemoteReference() : Reference|Field
Tags
Return values
Reference|FieldgetRemoteReferenceName()
public
getRemoteReferenceName() : string
Tags
Return values
stringgetSaveDataModifiers()
public
getSaveDataModifiers() : array<string|int, mixed>|array<string|int, callable>|null
Tags
Return values
array<string|int, mixed>|array<string|int, callable>|nullgetSetterTypeHint()
public
getSetterTypeHint() : EntityObject|string
Tags
Return values
EntityObject|stringgetTitle()
public
getTitle() : mixed
getTypeMask()
public
getTypeMask() : mixed
getValidators()
public
getValidators() : array<string|int, callable>|array<string|int, Validator>
Tags
Return values
array<string|int, callable>|array<string|int, Validator>hasParameter()
public
hasParameter(mixed $name) : mixed
Parameters
- $name : mixed
isSerialized()
public
isSerialized() : bool
Return values
boolmodifyValueBeforeSave()
public
modifyValueBeforeSave(mixed $value, mixed $data) : mixed
Parameters
- $value : mixed
- $data : mixed
Tags
postInitialize()
Called after being initialized by Entity
public
postInitialize() : null
Return values
nullresetEntity()
public
resetEntity() : mixed
serialize()
public
serialize(mixed $value) : mixed
Parameters
- $value : mixed
setConnection()
public
setConnection(mixed $connection) : mixed
Parameters
- $connection : mixed
setEntity()
public
setEntity(Entity $entity) : mixed
Parameters
- $entity : Entity
Tags
setName()
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
setParameter()
public
setParameter(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
setParentField()
public
setParentField(Field $parentField) : mixed
Parameters
- $parentField : Field
setSerialized()
public
setSerialized() : mixed
Tags
unserialize()
public
unserialize(mixed $value) : mixed
Parameters
- $value : mixed
validateValue()
public
validateValue(mixed $value, mixed $primary, mixed $row, Result $result) : Result
Parameters
- $value : mixed
- $primary : mixed
- $row : mixed
- $result : Result