addEventListener

API Quick reference
Variable name: addEventListener
CMS versions: 0.9.x + Evo
Input parameters: $evtName, $pluginName
Return if successful: Array of events and plugins
Return type: array
Return on failure:
Object parent:

API:addEventListener

Description / Usage

string addEventListener($evtName, $pluginName);

Add an event listener to a plugin - only for use within the current execution cycle.

Function Source

function addEventListener($evtName, $pluginName) {
if (!$evtName || !$pluginName)
return false;
if (!array_key_exists($evtName,$this->pluginEvent))
$this->pluginEvent[$evtName] = array();
return array_push($this->pluginEvent[$evtName], $pluginName); // return array count
}

Suggest an edit to this page.