Runtime
The plugin initializes itself on action init
with priority 5
(see the loading chain) so after this hook, you can access the whole Runtime object with a simple wrapper class. Within the Runtime, we invoke certain singletons, accessible by their class names.
To get the Runtime object:
$runtime = \Notification::runtime();
To get the Settings component:
// via the component
use BracketSpace\Notification\Core\Settings;
$settings = \Notification::component(Settings::class);
// or via the alias
$settings = \Notification::settings()
To get the plugin version:
$version = \Notification::version();
To get the plugin filesystem:
$fs= \Notification::fs();
Last updated