Class SetAssociatedAction
Command to replace all entities associated to another entity.
-
BEdita\Core\Model\Action\BaseAction
uses
Cake\Core\InstanceConfigTrait (not available)
-
BEdita\Core\Model\Action\UpdateAssociatedAction
-
BEdita\Core\Model\Action\SetAssociatedAction
uses
BEdita\Core\Model\Action\AssociatedTrait (not available)
Methods summary
protected
integer|false
|
#
update( Cake\Datasource\EntityInterface $entity, Cake\Datasource\EntityInterface|Cake\Datasource\EntityInterface[]|null $relatedEntities )
Replace existing relations.
Replace existing relations.
Parameters
- $entity
- Source entity.
- $relatedEntities
- Related entity(-ies).
Returns
integer|false Number of updated relationships, or false on failure.
Throws
RuntimeException Throws an exception if an unsupported association is passed.
|
protected
integer|false
|
#
toMany( Cake\Datasource\EntityInterface $entity, array $relatedEntities )
Process action for to-many relationships.
Process action for to-many relationships.
Parameters
- $entity
- Source entity.
- $relatedEntities
- Related entities.
Returns
integer|false
|
protected
integer|false
|
#
belongsTo( Cake\Datasource\EntityInterface $entity, Cake\Datasource\EntityInterface $relatedEntity = null )
Process action for "belongs to" relationships.
Process action for "belongs to" relationships.
Parameters
- $entity
- Source entity.
- $relatedEntity
- Related entity.
Returns
integer|false
|
protected
integer|false
|
#
hasOne( Cake\Datasource\EntityInterface $entity, Cake\Datasource\EntityInterface $relatedEntity = null )
Process action for "has one" relationships.
Process action for "has one" relationships.
Parameters
- $entity
- Source entity.
- $relatedEntity
- Related entity.
Returns
integer|false
|