ManagesEvents
Table of Contents
- callComposer() : void
- Call the composer for a given view.
- callCreator() : void
- Call the creator for a given view.
- composer() : array<string|int, mixed>
- Register a view composer event.
- composers() : array<string|int, mixed>
- Register multiple view composers via an array.
- creator() : array<string|int, mixed>
- Register a view creator event.
- addClassEvent() : Closure
- Register a class based view composer.
- addEventListener() : void
- Add a listener to the event dispatcher.
- addViewEvent() : Closure|null
- Add an event for a given view.
- buildClassEventCallback() : Closure
- Build a class based container callback Closure.
- classEventMethodForPrefix() : string
- Determine the class event method based on the given prefix.
- parseClassEvent() : array<string|int, mixed>
- Parse a class based composer name.
Methods
callComposer()
Call the composer for a given view.
public
callComposer(View $view) : void
Parameters
- $view : View
Return values
void —callCreator()
Call the creator for a given view.
public
callCreator(View $view) : void
Parameters
- $view : View
Return values
void —composer()
Register a view composer event.
public
composer(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
- $views : array<string|int, mixed>|string
- $callback : Closure|string
Return values
array<string|int, mixed> —composers()
Register multiple view composers via an array.
public
composers(array<string|int, mixed> $composers) : array<string|int, mixed>
Parameters
- $composers : array<string|int, mixed>
Return values
array<string|int, mixed> —creator()
Register a view creator event.
public
creator(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
- $views : array<string|int, mixed>|string
- $callback : Closure|string
Return values
array<string|int, mixed> —addClassEvent()
Register a class based view composer.
protected
addClassEvent(string $view, string $class, string $prefix) : Closure
Parameters
- $view : string
- $class : string
- $prefix : string
Return values
Closure —addEventListener()
Add a listener to the event dispatcher.
protected
addEventListener(string $name, Closure $callback) : void
Parameters
- $name : string
- $callback : Closure
Return values
void —addViewEvent()
Add an event for a given view.
protected
addViewEvent(string $view, Closure|string $callback[, string $prefix = 'composing: ' ]) : Closure|null
Parameters
- $view : string
- $callback : Closure|string
- $prefix : string = 'composing: '
Return values
Closure|null —buildClassEventCallback()
Build a class based container callback Closure.
protected
buildClassEventCallback(string $class, string $prefix) : Closure
Parameters
- $class : string
- $prefix : string
Return values
Closure —classEventMethodForPrefix()
Determine the class event method based on the given prefix.
protected
classEventMethodForPrefix(string $prefix) : string
Parameters
- $prefix : string
Return values
string —parseClassEvent()
Parse a class based composer name.
protected
parseClassEvent(string $class, string $prefix) : array<string|int, mixed>
Parameters
- $class : string
- $prefix : string