diff --git a/core/lib/Thelia/Action/Document.php b/core/lib/Thelia/Action/Document.php index 6b5188ba8..5b5f2b94e 100644 --- a/core/lib/Thelia/Action/Document.php +++ b/core/lib/Thelia/Action/Document.php @@ -25,9 +25,9 @@ namespace Thelia\Action; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Thelia\Core\Event\DocumentCreateOrUpdateEvent; -use Thelia\Core\Event\DocumentDeleteEvent; -use Thelia\Core\Event\DocumentEvent; +use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent; +use Thelia\Core\Event\Document\DocumentDeleteEvent; +use Thelia\Core\Event\Document\DocumentEvent; use Thelia\Exception\ImageException; use Thelia\Model\ConfigQuery; use Thelia\Tools\FileManager; @@ -139,7 +139,7 @@ class Document extends BaseCachedFile implements EventSubscriberInterface /** * Take care of saving document in the database and file storage * - * @param DocumentCreateOrUpdateEvent $event Document event + * @param \Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent $event Document event * * @throws \Thelia\Exception\ImageException * @todo refactor make all documents using propel inheritance and factorise image behaviour into one single clean action @@ -183,7 +183,7 @@ class Document extends BaseCachedFile implements EventSubscriberInterface /** * Take care of updating document in the database and file storage * - * @param DocumentCreateOrUpdateEvent $event Document event + * @param \Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent $event Document event * * @throws \Thelia\Exception\ImageException * @todo refactor make all documents using propel inheritance and factorise image behaviour into one single clean action @@ -225,7 +225,7 @@ class Document extends BaseCachedFile implements EventSubscriberInterface /** * Take care of deleting document in the database and file storage * - * @param DocumentDeleteEvent $event Image event + * @param \Thelia\Core\Event\Document\DocumentDeleteEvent $event Image event * * @throws \Exception * @todo refactor make all documents using propel inheritance and factorise image behaviour into one single clean action diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index f229542e1..762ec2392 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -46,24 +46,24 @@ use Thelia\Model\TaxRuleQuery; use Thelia\Model\TaxQuery; use Thelia\Model\AccessoryQuery; use Thelia\Model\Accessory; -use Thelia\Core\Event\FeatureProductUpdateEvent; +use Thelia\Core\Event\FeatureProduct\FeatureProductUpdateEvent; use Thelia\Model\FeatureProduct; use Thelia\Model\FeatureQuery; -use Thelia\Core\Event\FeatureProductDeleteEvent; +use Thelia\Core\Event\FeatureProduct\FeatureProductDeleteEvent; use Thelia\Model\FeatureProductQuery; use Thelia\Model\ProductCategoryQuery; -use Thelia\Core\Event\ProductSetTemplateEvent; +use Thelia\Core\Event\Product\ProductSetTemplateEvent; use Thelia\Model\AttributeCombinationQuery; use Thelia\Model\ProductSaleElementsQuery; use Propel\Runtime\ActiveQuery\PropelQuery; -use Thelia\Core\Event\ProductDeleteCategoryEvent; -use Thelia\Core\Event\ProductAddCategoryEvent; +use Thelia\Core\Event\Product\ProductDeleteCategoryEvent; +use Thelia\Core\Event\Product\ProductAddCategoryEvent; use Thelia\Model\AttributeAvQuery; use Thelia\Model\AttributeCombination; -use Thelia\Core\Event\ProductCreateCombinationEvent; +use Thelia\Core\Event\Product\ProductCreateCombinationEvent; use Propel\Runtime\Propel; use Thelia\Model\Map\ProductTableMap; -use Thelia\Core\Event\ProductDeleteCombinationEvent; +use Thelia\Core\Event\Product\ProductDeleteCombinationEvent; use Thelia\Model\ProductPrice; use Thelia\Model\ProductSaleElements; use Thelia\Core\Event\Product\ProductAddAccessoryEvent; diff --git a/core/lib/Thelia/Controller/Admin/FileController.php b/core/lib/Thelia/Controller/Admin/FileController.php index f43f30fe6..df425249c 100755 --- a/core/lib/Thelia/Controller/Admin/FileController.php +++ b/core/lib/Thelia/Controller/Admin/FileController.php @@ -28,8 +28,8 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Router; -use Thelia\Core\Event\DocumentCreateOrUpdateEvent; -use Thelia\Core\Event\DocumentDeleteEvent; +use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent; +use Thelia\Core\Event\Document\DocumentDeleteEvent; use Thelia\Core\Event\ImageCreateOrUpdateEvent; use Thelia\Core\Event\ImageDeleteEvent; use Thelia\Core\Event\TheliaEvents; diff --git a/core/lib/Thelia/Core/Event/DocumentCreateOrUpdateEvent.php b/core/lib/Thelia/Core/Event/Document/DocumentCreateOrUpdateEvent.php similarity index 98% rename from core/lib/Thelia/Core/Event/DocumentCreateOrUpdateEvent.php rename to core/lib/Thelia/Core/Event/Document/DocumentCreateOrUpdateEvent.php index 81e52257e..f2387c8f0 100755 --- a/core/lib/Thelia/Core/Event/DocumentCreateOrUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/Document/DocumentCreateOrUpdateEvent.php @@ -21,8 +21,9 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Document; use Symfony\Component\HttpFoundation\File\UploadedFile; +use Thelia\Core\Event\ActionEvent; use Thelia\Model\CategoryDocument; use Thelia\Model\ContentDocument; use Thelia\Model\FolderDocument; diff --git a/core/lib/Thelia/Core/Event/DocumentDeleteEvent.php b/core/lib/Thelia/Core/Event/Document/DocumentDeleteEvent.php similarity index 98% rename from core/lib/Thelia/Core/Event/DocumentDeleteEvent.php rename to core/lib/Thelia/Core/Event/Document/DocumentDeleteEvent.php index d9e2b7161..68da5c0c1 100755 --- a/core/lib/Thelia/Core/Event/DocumentDeleteEvent.php +++ b/core/lib/Thelia/Core/Event/Document/DocumentDeleteEvent.php @@ -21,8 +21,9 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Document; +use Thelia\Core\Event\ActionEvent; use Thelia\Model\CategoryDocument; use Thelia\Model\ContentDocument; use Thelia\Model\FolderDocument; diff --git a/core/lib/Thelia/Core/Event/DocumentEvent.php b/core/lib/Thelia/Core/Event/Document/DocumentEvent.php similarity index 97% rename from core/lib/Thelia/Core/Event/DocumentEvent.php rename to core/lib/Thelia/Core/Event/Document/DocumentEvent.php index 6248b8d9a..dd3fe86b1 100644 --- a/core/lib/Thelia/Core/Event/DocumentEvent.php +++ b/core/lib/Thelia/Core/Event/Document/DocumentEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Document; +use Thelia\Core\Event\CachedFileEvent; /** * Class DocumentEvent diff --git a/core/lib/Thelia/Core/Event/FeatureProductDeleteEvent.php b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php similarity index 96% rename from core/lib/Thelia/Core/Event/FeatureProductDeleteEvent.php rename to core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php index 5c74c6287..73cb88013 100644 --- a/core/lib/Thelia/Core/Event/FeatureProductDeleteEvent.php +++ b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\FeatureProduct; +use Thelia\Core\Event\FeatureProduct\FeatureProductEvent; use Thelia\Model\FeatureProduct; class FeatureProductDeleteEvent extends FeatureProductEvent diff --git a/core/lib/Thelia/Core/Event/FeatureProductEvent.php b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductEvent.php similarity index 96% rename from core/lib/Thelia/Core/Event/FeatureProductEvent.php rename to core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductEvent.php index 0acf48569..194469673 100644 --- a/core/lib/Thelia/Core/Event/FeatureProductEvent.php +++ b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\FeatureProduct; +use Thelia\Core\Event\ActionEvent; use Thelia\Model\FeatureProduct; class FeatureProductEvent extends ActionEvent diff --git a/core/lib/Thelia/Core/Event/FeatureProductUpdateEvent.php b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php similarity index 96% rename from core/lib/Thelia/Core/Event/FeatureProductUpdateEvent.php rename to core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php index 5493c55a7..8cb90dfdd 100644 --- a/core/lib/Thelia/Core/Event/FeatureProductUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\FeatureProduct; +use Thelia\Core\Event\FeatureProduct\FeatureProductEvent; use Thelia\Model\FeatureProduct; class FeatureProductUpdateEvent extends FeatureProductEvent diff --git a/core/lib/Thelia/Core/Event/ProductAddCategoryEvent.php b/core/lib/Thelia/Core/Event/Product/ProductAddCategoryEvent.php similarity index 96% rename from core/lib/Thelia/Core/Event/ProductAddCategoryEvent.php rename to core/lib/Thelia/Core/Event/Product/ProductAddCategoryEvent.php index 215b61f99..fba7743e8 100644 --- a/core/lib/Thelia/Core/Event/ProductAddCategoryEvent.php +++ b/core/lib/Thelia/Core/Event/Product/ProductAddCategoryEvent.php @@ -21,8 +21,9 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Product; +use Thelia\Core\Event\ProductEvent; use Thelia\Model\Product; class ProductAddCategoryEvent extends ProductEvent diff --git a/core/lib/Thelia/Core/Event/ProductCreateCombinationEvent.php b/core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php similarity index 97% rename from core/lib/Thelia/Core/Event/ProductCreateCombinationEvent.php rename to core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php index 322451199..db53d9296 100644 --- a/core/lib/Thelia/Core/Event/ProductCreateCombinationEvent.php +++ b/core/lib/Thelia/Core/Event/Product/ProductCreateCombinationEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Product; +use Thelia\Core\Event\ProductEvent; use Thelia\Model\Product; class ProductCreateCombinationEvent extends ProductEvent diff --git a/core/lib/Thelia/Core/Event/ProductDeleteCategoryEvent.php b/core/lib/Thelia/Core/Event/Product/ProductDeleteCategoryEvent.php similarity index 96% rename from core/lib/Thelia/Core/Event/ProductDeleteCategoryEvent.php rename to core/lib/Thelia/Core/Event/Product/ProductDeleteCategoryEvent.php index 4fcfeee92..7cd0bea76 100644 --- a/core/lib/Thelia/Core/Event/ProductDeleteCategoryEvent.php +++ b/core/lib/Thelia/Core/Event/Product/ProductDeleteCategoryEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Product; +use Thelia\Core\Event\ProductEvent; use Thelia\Model\Product; class ProductDeleteCategoryEvent extends ProductEvent diff --git a/core/lib/Thelia/Core/Event/ProductDeleteCombinationEvent.php b/core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php similarity index 97% rename from core/lib/Thelia/Core/Event/ProductDeleteCombinationEvent.php rename to core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php index 3cc9a25ce..37e0786bb 100644 --- a/core/lib/Thelia/Core/Event/ProductDeleteCombinationEvent.php +++ b/core/lib/Thelia/Core/Event/Product/ProductDeleteCombinationEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Product; +use Thelia\Core\Event\ProductEvent; use Thelia\Model\Product; class ProductDeleteCombinationEvent extends ProductEvent diff --git a/core/lib/Thelia/Core/Event/ProductSetTemplateEvent.php b/core/lib/Thelia/Core/Event/Product/ProductSetTemplateEvent.php similarity index 97% rename from core/lib/Thelia/Core/Event/ProductSetTemplateEvent.php rename to core/lib/Thelia/Core/Event/Product/ProductSetTemplateEvent.php index c7c6dc760..fb72d5936 100644 --- a/core/lib/Thelia/Core/Event/ProductSetTemplateEvent.php +++ b/core/lib/Thelia/Core/Event/Product/ProductSetTemplateEvent.php @@ -21,7 +21,8 @@ /* */ /*************************************************************************************/ -namespace Thelia\Core\Event; +namespace Thelia\Core\Event\Product; +use Thelia\Core\Event\ProductEvent; use Thelia\Model\Product; use Thelia\Core\Event\ActionEvent; diff --git a/core/lib/Thelia/Core/Template/Loop/Document.php b/core/lib/Thelia/Core/Template/Loop/Document.php index d60aaf7b2..c5a4da47c 100644 --- a/core/lib/Thelia/Core/Template/Loop/Document.php +++ b/core/lib/Thelia/Core/Template/Loop/Document.php @@ -24,7 +24,7 @@ namespace Thelia\Core\Template\Loop; use Thelia\Core\Template\Element\BaseI18nLoop; use Thelia\Core\Template\Loop\Argument\Argument; -use Thelia\Core\Event\DocumentEvent; +use Thelia\Core\Event\Document\DocumentEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Template\Loop\Argument\ArgumentCollection; use Thelia\Type\TypeCollection; diff --git a/core/lib/Thelia/Model/FeatureProduct.php b/core/lib/Thelia/Model/FeatureProduct.php index fe6c5d8c1..bc4440a26 100755 --- a/core/lib/Thelia/Model/FeatureProduct.php +++ b/core/lib/Thelia/Model/FeatureProduct.php @@ -5,7 +5,7 @@ namespace Thelia\Model; use Thelia\Model\Base\FeatureProduct as BaseFeatureProduct; use Thelia\Core\Event\TheliaEvents; use Propel\Runtime\Connection\ConnectionInterface; -use Thelia\Core\Event\FeatureProductEvent; +use Thelia\Core\Event\FeatureProduct\FeatureProductEvent; class FeatureProduct extends BaseFeatureProduct { diff --git a/core/lib/Thelia/Tests/Action/DocumentTest.php b/core/lib/Thelia/Tests/Action/DocumentTest.php index 39aece1f4..41ed063e1 100644 --- a/core/lib/Thelia/Tests/Action/DocumentTest.php +++ b/core/lib/Thelia/Tests/Action/DocumentTest.php @@ -28,7 +28,7 @@ use Thelia\Core\HttpFoundation\Request; use Thelia\Core\HttpFoundation\Session\Session; use Thelia\Action\Document; -use Thelia\Core\Event\DocumentEvent; +use Thelia\Core\Event\Document\DocumentEvent; use Thelia\Model\ConfigQuery; /** diff --git a/core/lib/Thelia/Tests/Tools/FileManagerTest.php b/core/lib/Thelia/Tests/Tools/FileManagerTest.php index 8c1c9fe99..40b46a624 100644 --- a/core/lib/Thelia/Tests/Tools/FileManagerTest.php +++ b/core/lib/Thelia/Tests/Tools/FileManagerTest.php @@ -10,7 +10,7 @@ namespace Thelia\Tests\Type; -use Thelia\Core\Event\DocumentCreateOrUpdateEvent; +use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent; use Thelia\Core\Event\ImageCreateOrUpdateEvent; use Thelia\Core\Translation\Translator; use Thelia\Exception\ImageException; diff --git a/core/lib/Thelia/Tools/FileManager.php b/core/lib/Thelia/Tools/FileManager.php index ba5e1d24a..fe0953f67 100644 --- a/core/lib/Thelia/Tools/FileManager.php +++ b/core/lib/Thelia/Tools/FileManager.php @@ -24,7 +24,7 @@ namespace Thelia\Tools; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; -use Thelia\Core\Event\DocumentCreateOrUpdateEvent; +use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent; use Thelia\Core\Event\ImageCreateOrUpdateEvent; use Thelia\Core\HttpFoundation\Request; use Thelia\Core\Translation\Translator;