PHP Class Sulu\Component\Persistence\EventSubscriber\ORM\UserBlameSubscriber
Persists the user that created and the last user that changed ORM classes
implementing UserBlameInterface.
Mostrar archivo
Open project: sulu/sulu
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage = null, string $userClass ) |
|
|
getSubscribedEvents ( ) |
|
|
loadClassMetadata ( Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs $event ) |
Map creator and changer fields to User objects. |
|
onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $event ) |
|
|
Private Methods
Method |
Description |
|
getUser ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : Sulu\Component\Security\Authentication\UserInterface |
Return the user from the token. |
|
handleUserBlame ( Doctrine\Common\Persistence\Event\LifecycleEventArgs $event ) |
Record the creating and changing user on the
entity based on the logged-in user. |
|
Method Details
__construct()
public method
public __construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage = null, string $userClass ) |
$tokenStorage |
Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage |
|
$userClass |
string |
|
getSubscribedEvents()
public method
public onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $event ) |
$event |
Doctrine\ORM\Event\OnFlushEventArgs |
|