refactor product events, moving to Prduct folder
This commit is contained in:
@@ -30,14 +30,14 @@ use Thelia\Model\Product as ProductModel;
|
||||
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
|
||||
use Thelia\Core\Event\ProductUpdateEvent;
|
||||
use Thelia\Core\Event\ProductCreateEvent;
|
||||
use Thelia\Core\Event\ProductDeleteEvent;
|
||||
use Thelia\Core\Event\Product\ProductUpdateEvent;
|
||||
use Thelia\Core\Event\Product\ProductCreateEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteEvent;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Core\Event\UpdatePositionEvent;
|
||||
use Thelia\Core\Event\ProductToggleVisibilityEvent;
|
||||
use Thelia\Core\Event\ProductAddContentEvent;
|
||||
use Thelia\Core\Event\ProductDeleteContentEvent;
|
||||
use Thelia\Core\Event\Product\ProductToggleVisibilityEvent;
|
||||
use Thelia\Core\Event\Product\ProductAddContentEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteContentEvent;
|
||||
use Thelia\Model\ProductAssociatedContent;
|
||||
use Thelia\Model\ProductAssociatedContentQuery;
|
||||
use Thelia\Model\ProductCategory;
|
||||
@@ -46,15 +46,15 @@ use Thelia\Model\TaxRuleQuery;
|
||||
use Thelia\Model\TaxQuery;
|
||||
use Thelia\Model\AccessoryQuery;
|
||||
use Thelia\Model\Accessory;
|
||||
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
||||
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
||||
use Thelia\Core\Event\Product\ProductAddAccessoryEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteAccessoryEvent;
|
||||
|
||||
class Product extends BaseAction implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
* Create a new product entry
|
||||
*
|
||||
* @param ProductCreateEvent $event
|
||||
* @param \Thelia\Core\Event\Product\ProductCreateEvent $event
|
||||
*/
|
||||
public function create(ProductCreateEvent $event)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
||||
/**
|
||||
* Change a product
|
||||
*
|
||||
* @param ProductUpdateEvent $event
|
||||
* @param \Thelia\Core\Event\Product\ProductUpdateEvent $event
|
||||
*/
|
||||
public function update(ProductUpdateEvent $event)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ class Product extends BaseAction implements EventSubscriberInterface
|
||||
/**
|
||||
* Delete a product entry
|
||||
*
|
||||
* @param ProductDeleteEvent $event
|
||||
* @param \Thelia\Core\Event\Product\ProductDeleteEvent $event
|
||||
*/
|
||||
public function delete(ProductDeleteEvent $event)
|
||||
{
|
||||
|
||||
@@ -23,17 +23,17 @@
|
||||
|
||||
namespace Thelia\Controller\Admin;
|
||||
|
||||
use Thelia\Core\Event\ProductDeleteEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Event\ProductUpdateEvent;
|
||||
use Thelia\Core\Event\ProductCreateEvent;
|
||||
use Thelia\Core\Event\Product\ProductUpdateEvent;
|
||||
use Thelia\Core\Event\Product\ProductCreateEvent;
|
||||
use Thelia\Model\ProductQuery;
|
||||
use Thelia\Form\ProductModificationForm;
|
||||
use Thelia\Form\ProductCreationForm;
|
||||
use Thelia\Core\Event\UpdatePositionEvent;
|
||||
use Thelia\Core\Event\ProductToggleVisibilityEvent;
|
||||
use Thelia\Core\Event\ProductDeleteContentEvent;
|
||||
use Thelia\Core\Event\ProductAddContentEvent;
|
||||
use Thelia\Core\Event\Product\ProductToggleVisibilityEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteContentEvent;
|
||||
use Thelia\Core\Event\Product\ProductAddContentEvent;
|
||||
use Thelia\Model\ProductAssociatedContent;
|
||||
use Thelia\Model\FolderQuery;
|
||||
use Thelia\Model\ContentQuery;
|
||||
@@ -41,8 +41,8 @@ use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Thelia\Model\ProductAssociatedContentQuery;
|
||||
use Thelia\Model\AccessoryQuery;
|
||||
use Thelia\Model\CategoryQuery;
|
||||
use Thelia\Core\Event\ProductAddAccessoryEvent;
|
||||
use Thelia\Core\Event\ProductDeleteAccessoryEvent;
|
||||
use Thelia\Core\Event\Product\ProductAddAccessoryEvent;
|
||||
use Thelia\Core\Event\Product\ProductDeleteAccessoryEvent;
|
||||
|
||||
/**
|
||||
* Manages products
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
use Thelia\Model\Product;
|
||||
|
||||
class ProductAddAccessoryEvent extends ProductEvent
|
||||
@@ -21,8 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
use Thelia\Model\Product;
|
||||
|
||||
class ProductAddContentEvent extends ProductEvent
|
||||
@@ -21,7 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
|
||||
class ProductCreateEvent extends ProductEvent
|
||||
{
|
||||
@@ -21,8 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
use Thelia\Model\Product;
|
||||
|
||||
class ProductDeleteAccessoryEvent extends ProductEvent
|
||||
@@ -21,8 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
use Thelia\Model\Product;
|
||||
|
||||
class ProductDeleteContentEvent extends ProductEvent
|
||||
@@ -21,7 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
|
||||
class ProductDeleteEvent extends ProductEvent
|
||||
{
|
||||
@@ -21,7 +21,7 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Model\Product;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
@@ -21,7 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
|
||||
class ProductToggleVisibilityEvent extends ProductEvent
|
||||
{
|
||||
@@ -21,7 +21,9 @@
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
namespace Thelia\Core\Event\Product;
|
||||
|
||||
use Thelia\Core\Event\Product\ProductCreateEvent;
|
||||
|
||||
class ProductUpdateEvent extends ProductCreateEvent
|
||||
{
|
||||
@@ -8,7 +8,7 @@ use Thelia\Tools\URL;
|
||||
use Thelia\TaxEngine\Calculator;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Event\ProductEvent;
|
||||
use Thelia\Core\Event\Product\ProductEvent;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\Propel;
|
||||
use Thelia\Model\Map\ProductTableMap;
|
||||
|
||||
@@ -90,12 +90,12 @@ URL: http://www.thelia.net
|
||||
<li><a href="{url path="/customer/account"}" class="login">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="customer_info_block" rel="customer_info_block"}
|
||||
{elseloop rel="customer_info_block"}
|
||||
<li><a href="{url path="/register"}" class="register">{intl l="Register"}!</a></li>
|
||||
<li><a href="{url path="/login"}" class="login">{intl l="Log In!"}</a></li>
|
||||
{/elseloop}
|
||||
<li class="dropdown">
|
||||
<a href="{url path="/cart"}" class="dropdown-toggle cart" data-toggle="dropdown">
|
||||
<a href="{url path="/cart"}" class="dropdown-toggle cart" {*data-toggle="dropdown"*}>
|
||||
Cart <span class="badge">{cart attr="count_item"}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user