mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
References like in CI4
This commit is contained in:
@@ -28,7 +28,9 @@ class Config extends FHC_Controller
|
||||
'component' => './Stv/Studentenverwaltung/Details/Notizen.js'
|
||||
];
|
||||
|
||||
Events::trigger('stv_conf_student', $result);
|
||||
Events::trigger('stv_conf_student', function & () use (&$result) {
|
||||
return $result;
|
||||
});
|
||||
|
||||
$this->outputJsonSuccess($result);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class CI3_Events
|
||||
self::$eventsSorted[$event] = false;
|
||||
}
|
||||
|
||||
public static function trigger($event, &...$args)
|
||||
public static function trigger($event, ...$args)
|
||||
{
|
||||
if (!isset(self::$events[$event]))
|
||||
return;
|
||||
@@ -37,7 +37,7 @@ class CI3_Events
|
||||
}
|
||||
|
||||
foreach (self::$events[$event] as $conf) {
|
||||
call_user_func_array($conf[1], $args);
|
||||
$conf[1](...$args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user