PHP Class Sulu\Component\Content\Document\Subscriber\BlameSubscriber

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: sulu/sulu

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage = null )
configureOptions ( Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent $event )
getSubscribedEvents ( )
handleMetadataLoad ( Sulu\Component\DocumentManager\Event\MetadataLoadEvent $event ) Adds the creator and changer to the metadata for persisting.
handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Persists the data of creator and changer to the Node.

Private Methods

Méthode Description
getUserId ( $options ) : integer Either returns the user id from the options array, or sets the id of the user of the current session.

Method Details

__construct() public méthode

public __construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage = null )
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage

configureOptions() public méthode

public configureOptions ( Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent $event )
$event Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent

getSubscribedEvents() public static méthode

public static getSubscribedEvents ( )

handleMetadataLoad() public méthode

Adds the creator and changer to the metadata for persisting.
public handleMetadataLoad ( Sulu\Component\DocumentManager\Event\MetadataLoadEvent $event )
$event Sulu\Component\DocumentManager\Event\MetadataLoadEvent

handlePersist() public méthode

Persists the data of creator and changer to the Node.
public handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent