mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Allow trigger to path data
This commit is contained in:
parent
b5bb42b52e
commit
5b8a4283b3
|
|
@ -75,7 +75,7 @@ class EventManager
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function trigger(string $group, string $id = '') /* : void */
|
public function trigger(string $group, string $id = '', $data) /* : void */
|
||||||
{
|
{
|
||||||
if(!isset($this->callbacks[$group])) {
|
if(!isset($this->callbacks[$group])) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -86,7 +86,7 @@ class EventManager
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->hasOutstanding($group)) {
|
if (!$this->hasOutstanding($group)) {
|
||||||
$this->callbacks[$group]['func']();
|
$this->callbacks[$group]['func']($data);
|
||||||
|
|
||||||
if ($this->callbacks[$group]['remove']) {
|
if ($this->callbacks[$group]['remove']) {
|
||||||
$this->detach($group);
|
$this->detach($group);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user