mirror of
https://github.com/getgrav/grav.git
synced 2026-03-02 02:21:29 +01:00
Moved PluginsLoadedEvent into Plugins::init() call for better backwards compatibility
This commit is contained in:
@@ -13,6 +13,7 @@ use Grav\Common\Config\Config;
|
||||
use Grav\Common\Data\Blueprints;
|
||||
use Grav\Common\Data\Data;
|
||||
use Grav\Common\File\CompiledYamlFile;
|
||||
use Grav\Events\PluginsLoadedEvent;
|
||||
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
@@ -112,6 +113,10 @@ class Plugins extends Iterator
|
||||
}
|
||||
}
|
||||
|
||||
// Plugins Loaded Event
|
||||
$event = new PluginsLoadedEvent($grav, $this);
|
||||
$grav->dispatchEvent($event);
|
||||
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ use Grav\Common\Page\Pages;
|
||||
use Grav\Common\Plugins;
|
||||
use Grav\Common\Uri;
|
||||
use Grav\Common\Utils;
|
||||
use Grav\Events\PluginsLoadedEvent;
|
||||
use Grav\Framework\Psr7\Response;
|
||||
use Grav\Framework\Session\Exceptions\SessionException;
|
||||
use Grav\Framework\Session\SessionInterface;
|
||||
@@ -171,10 +170,6 @@ class InitializeProcessor extends ProcessorBase
|
||||
$plugins = $grav['plugins'];
|
||||
$plugins->init();
|
||||
|
||||
// Plugins Loaded Event
|
||||
$event = new PluginsLoadedEvent($grav, $plugins);
|
||||
$grav->dispatchEvent($event);
|
||||
|
||||
$this->stopTimer('_plugins_load');
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,8 @@ class PageSystemValidatorCommand extends ConsoleCommand
|
||||
$config->init();
|
||||
$grav['plugins']->setup();
|
||||
$grav['debugger']->init();
|
||||
// Initialize the timezone.
|
||||
|
||||
// Initialize the timezone.
|
||||
$timezone = $config->get('system.timezone');
|
||||
if ($timezone) {
|
||||
date_default_timezone_set($timezone);
|
||||
|
||||
Reference in New Issue
Block a user