Event Subject Filter Decorator
Use this decorator to allow your event listener to only be invoked if event subject matches the allowedSubject
option.
The allowedSubject
option can be a list of class names, if you want to check multiple classes.
__invoke( )
Invoke
Cake\Event\Decorator\AbstractDecorator::__invoke()
canTrigger( Cake\Event\Event $event )
Checks if the event is triggered for this listener.
Cake\Event\Event
$event
__construct( callable $callable , array $options [] )
Constructor.
$callable
$options
optional [] _call( array $args )
Calls the decorated callable with the passed arguments.
$args
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Event.Decorator.SubjectFilterDecorator.html