trait
Illuminate
/
View
/
Concerns
/
ManagesEvents
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
ManagesEvents
Methods
public
creator ( $views , $callback ) : array
Register a view creator event.
Parameters
- $views array|string
- $callback Closure |string
public
composers ( array $composers ) : array
Register multiple view composers via an array.
Parameters
- $composers array
public
composer ( $views , $callback ) : array
Register a view composer event.
Parameters
- $views array|string
- $callback Closure |string
protected
addViewEvent ( $view , $callback , $prefix ) : Closure |null
Add an event for a given view.
Parameters
- $view string
- $callback Closure |string
- $prefix string
protected
addClassEvent ( $view , $class , $prefix ) : Closure
Register a class based view composer.
Parameters
- $view string
- $class string
- $prefix string
protected
buildClassEventCallback ( $class , $prefix ) : Closure
Build a class based container callback Closure.
Parameters
- $class string
- $prefix string
protected
parseClassEvent ( $class , $prefix ) : array
Parse a class based composer name.
Parameters
- $class string
- $prefix string
protected
classEventMethodForPrefix ( $prefix ) : string
Determine the class event method based on the given prefix.
Parameters
- $prefix string
protected
addEventListener ( $name , $callback ) : void
Add a listener to the event dispatcher.
Parameters
- $name string
- $callback Closure