refactor document events
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -21,7 +21,8 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Document;
|
||||
use Thelia\Core\Event\CachedFileEvent;
|
||||
|
||||
/**
|
||||
* Class DocumentEvent
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user