add new event and new tag

This commit is contained in:
Manuel Raynaud
2013-09-07 16:31:15 +02:00
parent f6ab8888f3
commit 5315e13ce9
6 changed files with 142 additions and 3 deletions

View File

@@ -33,6 +33,11 @@ namespace Thelia\Core\Event;
final class TheliaEvents
{
/**
* sent at the beginning
*/
const BOOT = "thelia.boot";
/**
* ACTION event
*

View File

@@ -39,6 +39,7 @@ use Symfony\Component\Yaml\Yaml;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Thelia\Core\Bundle;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Log\Tlog;
use Thelia\Config\DatabaseConfiguration;
use Thelia\Config\DefinePropel;
@@ -88,6 +89,16 @@ class Thelia extends Kernel
}
}
/**
* dispatch an event when application is boot
*/
public function boot()
{
parent::boot();
$this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT);
}
/**
*
* Load some configuration