CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.4 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.4
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
      • Session
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Constraint
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • AbstractDecorator
  • ConditionDecorator
  • SubjectFilterDecorator

Class SubjectFilterDecorator

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.

Cake\Event\Decorator\AbstractDecorator
Extended by Cake\Event\Decorator\SubjectFilterDecorator
Namespace: Cake\Event\Decorator
Location: Event/Decorator/SubjectFilterDecorator.php

Inherited Properties

  • _callable, _options

Method Summary

  • __invoke() public
    Invoke
  • canTrigger() public
    Checks if the event is triggered for this listener.

Method Detail

__invoke() public ¶

__invoke( )

Invoke

Returns
mixed
Overrides
Cake\Event\Decorator\AbstractDecorator::__invoke()

canTrigger() public ¶

canTrigger( Cake\Event\Event $event )

Checks if the event is triggered for this listener.

Parameters
Cake\Event\Event $event
Event object.
Returns
boolean

Methods inherited from Cake\Event\Decorator\AbstractDecorator

__construct() public ¶

__construct( callable $callable , array $options = [] )

Constructor.

Parameters
callable $callable
Callable.
array $options optional []
Decorator options.

_call() protected ¶

_call( array $args )

Calls the decorated callable with the passed arguments.

Parameters
array $args
Arguments for the callable.
Returns
mixed
Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs