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

@@ -0,0 +1,61 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Core\Event\Module;
/**
* Class ModuleDeleteEvent
* @package Thelia\Core\Event\Module
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ModuleDeleteEvent extends ModuleEvent
{
/**
* @var int module id
*/
protected $module_id;
function __construct($module_id)
{
$this->module_id = $module_id;
}
/**
* @param int $module_id
*/
public function setModuleId($module_id)
{
$this->module_id = $module_id;
}
/**
* @return int
*/
public function getModuleId()
{
return $this->module_id;
}
}

View File

@@ -665,6 +665,11 @@ final class TheliaEvents
*/
const MODULE_TOGGLE_ACTIVATION = 'thelia.module.toggleActivation';
/**
* sent when a module is deleted
*/
const MODULE_DELETE = 'thelia.module.delete';
/**
* sent for clearing cache
*/