refactor address and attribute events

This commit is contained in:
Manuel Raynaud
2013-09-30 10:03:14 +02:00
parent efb5a7a54d
commit b023c33cc7
20 changed files with 50 additions and 34 deletions

View File

@@ -25,8 +25,8 @@ namespace Thelia\Action;
use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Exception\PropelException;
use Propel\Runtime\Propel; use Propel\Runtime\Propel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\AddressCreateOrUpdateEvent; use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent;
use Thelia\Core\Event\AddressEvent; use Thelia\Core\Event\Address\AddressEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Address as AddressModel; use Thelia\Model\Address as AddressModel;
use Thelia\Model\Map\AddressTableMap; use Thelia\Model\Map\AddressTableMap;

View File

@@ -30,15 +30,15 @@ use Thelia\Model\Attribute as AttributeModel;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\AttributeUpdateEvent; use Thelia\Core\Event\Attribute\AttributeUpdateEvent;
use Thelia\Core\Event\AttributeCreateEvent; use Thelia\Core\Event\Attribute\AttributeCreateEvent;
use Thelia\Core\Event\AttributeDeleteEvent; use Thelia\Core\Event\Attribute\AttributeDeleteEvent;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Model\AttributeAv; use Thelia\Model\AttributeAv;
use Thelia\Model\AttributeAvQuery; use Thelia\Model\AttributeAvQuery;
use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdatePositionEvent;
use Thelia\Core\Event\CategoryEvent; use Thelia\Core\Event\CategoryEvent;
use Thelia\Core\Event\AttributeEvent; use Thelia\Core\Event\Attribute\AttributeEvent;
use Thelia\Model\AttributeTemplate; use Thelia\Model\AttributeTemplate;
use Thelia\Model\AttributeTemplateQuery; use Thelia\Model\AttributeTemplateQuery;
use Thelia\Model\TemplateQuery; use Thelia\Model\TemplateQuery;

View File

@@ -30,9 +30,9 @@ use Thelia\Model\AttributeAv as AttributeAvModel;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\AttributeAvUpdateEvent; use Thelia\Core\Event\Attribute\AttributeAvUpdateEvent;
use Thelia\Core\Event\AttributeAvCreateEvent; use Thelia\Core\Event\Attribute\AttributeAvCreateEvent;
use Thelia\Core\Event\AttributeAvDeleteEvent; use Thelia\Core\Event\Attribute\AttributeAvDeleteEvent;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdatePositionEvent;
@@ -63,7 +63,7 @@ class AttributeAv extends BaseAction implements EventSubscriberInterface
/** /**
* Change a product attribute * Change a product attribute
* *
* @param AttributeAvUpdateEvent $event * @param \Thelia\Core\Event\Attribute\AttributeAvUpdateEvent $event
*/ */
public function update(AttributeAvUpdateEvent $event) public function update(AttributeAvUpdateEvent $event)
{ {

View File

@@ -23,10 +23,10 @@
namespace Thelia\Controller\Admin; namespace Thelia\Controller\Admin;
use Thelia\Core\Event\AttributeAvDeleteEvent; use Thelia\Core\Event\Attribute\AttributeAvDeleteEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\AttributeAvUpdateEvent; use Thelia\Core\Event\Attribute\AttributeAvUpdateEvent;
use Thelia\Core\Event\AttributeAvCreateEvent; use Thelia\Core\Event\Attribute\AttributeAvCreateEvent;
use Thelia\Model\AttributeAvQuery; use Thelia\Model\AttributeAvQuery;
use Thelia\Form\AttributeAvModificationForm; use Thelia\Form\AttributeAvModificationForm;
use Thelia\Form\AttributeAvCreationForm; use Thelia\Form\AttributeAvCreationForm;

View File

@@ -23,18 +23,18 @@
namespace Thelia\Controller\Admin; namespace Thelia\Controller\Admin;
use Thelia\Core\Event\AttributeDeleteEvent; use Thelia\Core\Event\Attribute\AttributeDeleteEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\AttributeUpdateEvent; use Thelia\Core\Event\Attribute\AttributeUpdateEvent;
use Thelia\Core\Event\AttributeCreateEvent; use Thelia\Core\Event\Attribute\AttributeCreateEvent;
use Thelia\Model\AttributeQuery; use Thelia\Model\AttributeQuery;
use Thelia\Form\AttributeModificationForm; use Thelia\Form\AttributeModificationForm;
use Thelia\Form\AttributeCreationForm; use Thelia\Form\AttributeCreationForm;
use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdatePositionEvent;
use Thelia\Model\AttributeAv; use Thelia\Model\AttributeAv;
use Thelia\Model\AttributeAvQuery; use Thelia\Model\AttributeAvQuery;
use Thelia\Core\Event\AttributeAvUpdateEvent; use Thelia\Core\Event\Attribute\AttributeAvUpdateEvent;
use Thelia\Core\Event\AttributeEvent; use Thelia\Core\Event\Attribute\AttributeEvent;
/** /**
* Manages attributes * Manages attributes

View File

@@ -22,8 +22,8 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Controller\Front; namespace Thelia\Controller\Front;
use Thelia\Core\Event\AddressCreateOrUpdateEvent; use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent;
use Thelia\Core\Event\AddressEvent; use Thelia\Core\Event\Address\AddressEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\AddressCreateForm; use Thelia\Form\AddressCreateForm;
use Thelia\Form\AddressUpdateForm; use Thelia\Form\AddressUpdateForm;

View File

@@ -21,8 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address; use Thelia\Model\Address;
use Thelia\Model\Customer; use Thelia\Model\Customer;

View File

@@ -21,8 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address; use Thelia\Model\Address;
/** /**

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeAvEvent;
class AttributeAvCreateEvent extends AttributeAvEvent class AttributeAvCreateEvent extends AttributeAvEvent
{ {

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeAvEvent;
class AttributeAvDeleteEvent extends AttributeAvEvent class AttributeAvDeleteEvent extends AttributeAvEvent
{ {

View File

@@ -21,7 +21,8 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\AttributeAv; use Thelia\Model\AttributeAv;
class AttributeAvEvent extends ActionEvent class AttributeAvEvent extends ActionEvent

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeAvCreateEvent;
class AttributeAvUpdateEvent extends AttributeAvCreateEvent class AttributeAvUpdateEvent extends AttributeAvCreateEvent
{ {

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeEvent;
class AttributeCreateEvent extends AttributeEvent class AttributeCreateEvent extends AttributeEvent
{ {

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeEvent;
class AttributeDeleteEvent extends AttributeEvent class AttributeDeleteEvent extends AttributeEvent
{ {

View File

@@ -21,7 +21,8 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Attribute; use Thelia\Model\Attribute;
class AttributeEvent extends ActionEvent class AttributeEvent extends ActionEvent

View File

@@ -21,7 +21,9 @@
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event; namespace Thelia\Core\Event\Attribute;
use Thelia\Core\Event\Attribute\AttributeCreateEvent;
class AttributeUpdateEvent extends AttributeCreateEvent class AttributeUpdateEvent extends AttributeCreateEvent
{ {

View File

@@ -4,7 +4,7 @@ namespace Thelia\Model;
use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Connection\ConnectionInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Thelia\Core\Event\AddressEvent; use Thelia\Core\Event\Address\AddressEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Base\Address as BaseAddress; use Thelia\Model\Base\Address as BaseAddress;
use Thelia\Model\AddressQuery; use Thelia\Model\AddressQuery;

View File

@@ -5,7 +5,7 @@ namespace Thelia\Model;
use Thelia\Model\Base\Attribute as BaseAttribute; use Thelia\Model\Base\Attribute as BaseAttribute;
use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\AttributeEvent; use Thelia\Core\Event\Attribute\AttributeEvent;
class Attribute extends BaseAttribute { class Attribute extends BaseAttribute {

View File

@@ -3,7 +3,7 @@
namespace Thelia\Model; namespace Thelia\Model;
use Thelia\Model\Base\AttributeAv as BaseAttributeAv; use Thelia\Model\Base\AttributeAv as BaseAttributeAv;
use Thelia\Core\Event\AttributeAvEvent; use Thelia\Core\Event\Attribute\AttributeAvEvent;
use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\Criteria;

View File

@@ -23,7 +23,7 @@
namespace Thelia\Tests\Action; namespace Thelia\Tests\Action;
use Thelia\Action\Address; use Thelia\Action\Address;
use Thelia\Core\Event\AddressCreateOrUpdateEvent; use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent;
use Thelia\Model\Base\CustomerQuery; use Thelia\Model\Base\CustomerQuery;
/** /**