create event object for module delete action

This commit is contained in:
Manuel Raynaud
2013-10-21 10:26:51 +02:00
parent 1545987d51
commit a10fa20340
7 changed files with 105 additions and 5 deletions

View File

@@ -22,10 +22,13 @@
/*************************************************************************************/
namespace Thelia\Action;
use Propel\Runtime\Propel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Cache\CacheEvent;
use Thelia\Core\Event\Module\ModuleDeleteEvent;
use Thelia\Core\Event\Module\ModuleToggleActivationEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Map\ModuleTableMap;
use Thelia\Model\ModuleQuery;
use Thelia\Module\BaseModule;
@@ -59,6 +62,11 @@ class Module extends BaseAction implements EventSubscriberInterface
}
}
public function delete(ModuleDeleteEvent $event)
{
}
protected function cacheClear()
{
$cacheEvent = new CacheEvent($this->container->getParameter('kernel.cache_dir'));
@@ -89,7 +97,8 @@ class Module extends BaseAction implements EventSubscriberInterface
public static function getSubscribedEvents()
{
return array(
TheliaEvents::MODULE_TOGGLE_ACTIVATION => array('toggleActivation', 128)
TheliaEvents::MODULE_TOGGLE_ACTIVATION => array('toggleActivation', 128),
TheliaEvents::MODULE_DELETE => array('delete', 128)
);
}
}