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

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

Public Methods

Method Description
__construct ( array $permissions )
getSubscribedEvents ( )
handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event ) Adds the security information to the hydrated object.
handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Adds the security information to the node.
supports ( $document ) : boolean Shows if the given document is supported by this subscriber.

Private Methods

Method Description
getAllowedPermissions ( $permissions ) : array Extracts the keys of the allowed permissions into an own array.

Method Details

__construct() public method

public __construct ( array $permissions )
$permissions array

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

handleHydrate() public method

Adds the security information to the hydrated object.
public handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event )
$event Sulu\Component\DocumentManager\Event\HydrateEvent

handlePersist() public method

Adds the security information to the node.
public handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

supports() public method

Shows if the given document is supported by this subscriber.
public supports ( $document ) : boolean
$document
return boolean