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

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Show file Open project: sulu/sulu

Public Methods

Method 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

Method 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 method

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

configureOptions() public method

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

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

handleMetadataLoad() public method

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 method

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