\Installer\Shell\TaskListenerHandlerTrait

Provides methods for attach and detach listener objects of concrete plugins.

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
_attachListeners()
_detachListeners()
$_listeners
N/A
No private methods found
No private properties found
N/A

Properties

$_listeners

$_listeners : array

List of all loaded listeners using "_attachListeners()" method.

Type

array

Methods

_attachListeners()

_attachListeners(string $plugin, string $path)

Loads and registers plugin's namespace and loads its event listeners classes.

This is used to allow plugins being installed to respond to events before they are integrated to the system. Events such as beforeInstall, afterInstall, etc.

Parameters

string $plugin

Name of the plugin for which attach listeners

string $path

Path to plugin's root directory (which contains "src")

Throws

\Cake\Error\FatalErrorException

On illegal usage of this method

_detachListeners()

_detachListeners() : void

Unloads all registered listeners that were attached using the "_attachListeners()" method.