refactor customer events

This commit is contained in:
Manuel Raynaud
2013-09-30 10:07:01 +02:00
parent b023c33cc7
commit 0ce4b25e72
8 changed files with 16 additions and 14 deletions

View File

@@ -25,11 +25,11 @@ namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Core\Event\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\CustomerEvent; use Thelia\Core\Event\Customer\CustomerEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Customer as CustomerModel; use Thelia\Model\Customer as CustomerModel;
use Thelia\Core\Event\CustomerLoginEvent; use Thelia\Core\Event\Customer\CustomerLoginEvent;
/** /**
* *

View File

@@ -24,8 +24,8 @@
namespace Thelia\Controller\Admin; namespace Thelia\Controller\Admin;
use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Exception\PropelException;
use Symfony\Component\Form\Form; use Symfony\Component\Form\Form;
use Thelia\Core\Event\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\CustomerEvent; use Thelia\Core\Event\Customer\CustomerEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\CustomerModification; use Thelia\Form\CustomerModification;
use Thelia\Form\Exception\FormValidationException; use Thelia\Form\Exception\FormValidationException;
@@ -151,7 +151,7 @@ class CustomerController extends BaseAdminController
/** /**
* @param $data * @param $data
* @return CustomerCreateOrUpdateEvent * @return \Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent
*/ */
private function createEventInstance($data) private function createEventInstance($data)
{ {

View File

@@ -22,8 +22,8 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Controller\Front; namespace Thelia\Controller\Front;
use Thelia\Core\Event\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\CustomerLoginEvent; use Thelia\Core\Event\Customer\CustomerLoginEvent;
use Thelia\Core\Event\LostPasswordEvent; use Thelia\Core\Event\LostPasswordEvent;
use Thelia\Core\Security\Authentication\CustomerUsernamePasswordFormAuthenticator; use Thelia\Core\Security\Authentication\CustomerUsernamePasswordFormAuthenticator;
use Thelia\Core\Security\Exception\AuthenticationException; use Thelia\Core\Security\Exception\AuthenticationException;
@@ -257,7 +257,7 @@ class CustomerController extends BaseFrontController
/** /**
* @param $data * @param $data
* @return CustomerCreateOrUpdateEvent * @return \Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent
*/ */
private function createEventInstance($data) private function createEventInstance($data)
{ {

View File

@@ -20,9 +20,10 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Customer;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Customer; use Thelia\Model\Customer;
/** /**

View File

@@ -21,7 +21,7 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Customer;
use Thelia\Model\Customer; use Thelia\Model\Customer;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;

View File

@@ -21,8 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Customer;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Customer; use Thelia\Model\Customer;
class CustomerLoginEvent extends ActionEvent class CustomerLoginEvent extends ActionEvent

View File

@@ -17,7 +17,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Propel; use Propel\Runtime\Propel;
use Thelia\Model\Map\CustomerTableMap; use Thelia\Model\Map\CustomerTableMap;
use Thelia\Core\Security\Role\Role; use Thelia\Core\Security\Role\Role;
use Thelia\Core\Event\CustomerEvent; use Thelia\Core\Event\Customer\CustomerEvent;
/** /**
* Skeleton subclass for representing a row from the 'customer' table. * Skeleton subclass for representing a row from the 'customer' table.

View File

@@ -23,7 +23,7 @@
namespace Thelia\Tests\Action\ImageTest; namespace Thelia\Tests\Action\ImageTest;
use Thelia\Action\Customer; use Thelia\Action\Customer;
use Thelia\Core\Event\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
/** /**