Class Socialveo\Core\behaviors\IsAssociation

InheritanceSocialveo\Core\behaviors\IsAssociation » Phalcon\Mvc\Model\Behavior
ImplementsPhalcon\Mvc\Model\BehaviorInterface
Available since version1.0

Class IsAssociation

Method Details

afterCreate() public method (available since version 1.0)

After create

Checks if the model being deleted is an Association model (has "Association" in name) if so, it tries to get the target object of the association if the target object has a property "associations" - it adds the currently created element to target object's "associations"

public void afterCreate ( Phalcon\Mvc\ModelInterface $model )
$model Phalcon\Mvc\ModelInterface
afterDelete() public method (available since version 1.0)

After delete

Checks if the model being deleted is an Association model (has "Association" in name) if so, it tries to get the target object of the association if the target object has a property "associations" - it removes the currently deleted element to target object's "associations"

public void afterDelete ( Phalcon\Mvc\ModelInterface $model )
$model Phalcon\Mvc\ModelInterface
notify() public method (available since version 1.0)

Delegates events

public void notify ( $eventType, Phalcon\Mvc\ModelInterface $model )
$eventType string
$model Phalcon\Mvc\ModelInterface