PHP Class Sulu\Component\Persistence\EventSubscriber\ORM\TimestampableSubscriber

Inheritance: implements Doctrine\Common\EventSubscriber
Afficher le fichier Open project: sulu/sulu

Méthodes publiques

Méthode Description
getSubscribedEvents ( )
loadClassMetadata ( Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs $event ) Load the class data, mapping the created and changed fields to datetime fields.
prePersist ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event ) Set the timestamps before creation.
preUpdate ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event ) Set the timestamps before update.

Private Methods

Méthode Description
handleTimestamp ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event ) Set the timestamps. If created is NULL then set it. Always set the changed field.

Method Details

getSubscribedEvents() public méthode

public getSubscribedEvents ( )

loadClassMetadata() public méthode

Load the class data, mapping the created and changed fields to datetime fields.
public loadClassMetadata ( Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs $event )
$event Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs

prePersist() public méthode

Set the timestamps before creation.
public prePersist ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event )
$event Doctrine\Common\Persistence\Event\LifecycleEventArgs

preUpdate() public méthode

Set the timestamps before update.
public preUpdate ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event )
$event Doctrine\Common\Persistence\Event\LifecycleEventArgs