notifyEvent example

/** * Event listener function of the preUpdate live cycle event. Fired before an existing model saved. * * @return Enlight_Event_EventArgs|null */
    public function preUpdate(PreUpdateEventArgs $eventArgs)
    {
        /** @var ModelEntity $entity */
        $entity = $eventArgs->getObject();
        $entityName = $this->getEntityName($entity);

        return $this->notifyEvent($entityName . '::preUpdate', $eventArgs);
    }

    /** * Event listener function of the preRemove live cycle event. Fired before an model removed. * * @return Enlight_Event_EventArgs|null */
    public function preRemove(PreRemoveEventArgs $eventArgs)
    {
        /** @var ModelEntity $entity */
        $entity = $eventArgs->getObject();
        
Home | Imprint | This part of the site doesn't use cookies.