This commit is contained in:
Manuel Raynaud
2013-10-18 09:28:17 +02:00
parent 12b5a81364
commit 52ed89f1aa
70 changed files with 136 additions and 244 deletions

View File

@@ -34,7 +34,6 @@ use Thelia\Model\CountryQuery;
use Thelia\Action\BaseAction; use Thelia\Action\BaseAction;
use Thelia\Model\Area as AreaModel; use Thelia\Model\Area as AreaModel;
/** /**
* Class Area * Class Area
* @package Thelia\Action * @package Thelia\Action
@@ -97,7 +96,6 @@ class Area extends BaseAction implements EventSubscriberInterface
$event->setArea($area); $event->setArea($area);
} }
/** /**
* Returns an array of event names this subscriber wants to listen to. * Returns an array of event names this subscriber wants to listen to.
* *

View File

@@ -27,7 +27,6 @@ use Symfony\Component\Filesystem\Filesystem;
use Thelia\Core\Event\Cache\CacheEvent; use Thelia\Core\Event\Cache\CacheEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
/** /**
* Class Cache * Class Cache
* @package Thelia\Action * @package Thelia\Action
@@ -42,7 +41,6 @@ class Cache extends BaseAction implements EventSubscriberInterface
$directoryBrowser = new \DirectoryIterator($dir); $directoryBrowser = new \DirectoryIterator($dir);
$fs = new Filesystem(); $fs = new Filesystem();
$fs->remove($dir); $fs->remove($dir);

View File

@@ -32,7 +32,6 @@ use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Country as CountryModel; use Thelia\Model\Country as CountryModel;
use Thelia\Model\CountryQuery; use Thelia\Model\CountryQuery;
/** /**
* Class Country * Class Country
* @package Thelia\Action * @package Thelia\Action
@@ -85,15 +84,13 @@ class Country extends BaseAction implements EventSubscriberInterface
public function toggleDefault(CountryToggleDefaultEvent $event) public function toggleDefault(CountryToggleDefaultEvent $event)
{ {
if( null !== $country = CountryQuery::create()->findPk($event->getCountryId())) if ( null !== $country = CountryQuery::create()->findPk($event->getCountryId())) {
{
$country->toggleDefault(); $country->toggleDefault();
$event->setCountry($country); $event->setCountry($country);
} }
} }
/** /**
* Returns an array of event names this subscriber wants to listen to. * Returns an array of event names this subscriber wants to listen to.
* *

View File

@@ -25,7 +25,6 @@ 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\Customer\CustomerAddressEvent;
use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\Customer\CustomerEvent; use Thelia\Core\Event\Customer\CustomerEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;

View File

@@ -29,7 +29,6 @@ use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\ModuleQuery; use Thelia\Model\ModuleQuery;
use Thelia\Module\BaseModule; use Thelia\Module\BaseModule;
/** /**
* Class Module * Class Module
* @package Thelia\Action * @package Thelia\Action

View File

@@ -26,7 +26,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\PdfEvent; use Thelia\Core\Event\PdfEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
/** /**
* Class Pdf * Class Pdf
* @package Thelia\Action * @package Thelia\Action

View File

@@ -29,7 +29,6 @@ use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\AreaDeliveryModule; use Thelia\Model\AreaDeliveryModule;
use Thelia\Model\AreaDeliveryModuleQuery; use Thelia\Model\AreaDeliveryModuleQuery;
/** /**
* Class ShippingZone * Class ShippingZone
* @package Thelia\Action * @package Thelia\Action

View File

@@ -68,8 +68,6 @@ class TaxRule extends BaseAction implements EventSubscriberInterface
->save() ->save()
; ;
$event->setTaxRule($taxRule); $event->setTaxRule($taxRule);
} }
} }

View File

@@ -26,7 +26,6 @@ namespace Thelia\Command;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
use Thelia\Model\ModuleQuery; use Thelia\Model\ModuleQuery;

View File

@@ -25,7 +25,7 @@ namespace %%NAMESPACE%%;
use Thelia\Module\BaseModule; use Thelia\Module\BaseModule;
class %%CLASSNAME%% extends BaseModule class Class extends BaseModule
{ {
/** /**
* YOU HAVE TO IMPLEMENT HERE ABSTRACT METHODD FROM BaseModule Class * YOU HAVE TO IMPLEMENT HERE ABSTRACT METHODD FROM BaseModule Class

View File

@@ -24,14 +24,12 @@
namespace Thelia\Controller\Admin; namespace Thelia\Controller\Admin;
use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent; use Thelia\Core\Event\Address\AddressCreateOrUpdateEvent;
use Thelia\Core\Event\Address\AddressEvent; use Thelia\Core\Event\Address\AddressEvent;
use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
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;
use Thelia\Model\AddressQuery; use Thelia\Model\AddressQuery;
use Thelia\Model\CustomerQuery; use Thelia\Model\CustomerQuery;
/** /**
* Class AddressController * Class AddressController
* @package Thelia\Controller\Admin * @package Thelia\Controller\Admin
@@ -176,8 +174,6 @@ class AddressController extends AbstractCrudController
$formData["is_default"] $formData["is_default"]
); );
return $event; return $event;
} }

View File

@@ -25,14 +25,11 @@ 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\Address\AddressEvent;
use Thelia\Core\Event\Customer\CustomerAddressEvent;
use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent; use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\Customer\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;
use Thelia\Model\AddressQuery;
use Thelia\Model\CustomerQuery; use Thelia\Model\CustomerQuery;
use Thelia\Core\Translation\Translator; use Thelia\Core\Translation\Translator;
@@ -57,8 +54,6 @@ class CustomerController extends BaseAdminController
)); ));
} }
/** /**
* update customer action * update customer action
* *

View File

@@ -67,7 +67,6 @@ class ModuleController extends BaseAdminController
$message = $e->getMessage(); $message = $e->getMessage();
} }
if ($this->getRequest()->isXmlHttpRequest()) { if ($this->getRequest()->isXmlHttpRequest()) {
if ($message) { if ($message) {
$response = $this->jsonResponse(json_encode(array( $response = $this->jsonResponse(json_encode(array(

View File

@@ -211,7 +211,6 @@ class OrderController extends BaseAdminController
{ {
if (null !== $response = $this->checkAuth("admin.order.update")) return $response; if (null !== $response = $this->checkAuth("admin.order.update")) return $response;
$html = $this->renderRaw( $html = $this->renderRaw(
$fileName, $fileName,
array( array(

View File

@@ -140,5 +140,4 @@ class ShippingZoneController extends BaseAdminController
return $this->getRequest()->get('shipping_zone_id', 0); return $this->getRequest()->get('shipping_zone_id', 0);
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaAddCountryEvent * Class AreaAddCountryEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area
@@ -34,7 +33,7 @@ class AreaAddCountryEvent extends AreaEvent
protected $area_id; protected $area_id;
protected $country_id; protected $country_id;
function __construct($area_id, $country_id) public function __construct($area_id, $country_id)
{ {
$this->area_id = $area_id; $this->area_id = $area_id;
$this->country_id = $country_id; $this->country_id = $country_id;
@@ -80,7 +79,4 @@ class AreaAddCountryEvent extends AreaEvent
return $this->country_id; return $this->country_id;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaCreateEvent * Class AreaCreateEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area
@@ -49,5 +48,4 @@ class AreaCreateEvent extends AreaEvent
return $this->name; return $this->name;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaDeleteEvent * Class AreaDeleteEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area
@@ -61,5 +60,4 @@ class AreaDeleteEvent extends AreaEvent
return $this->area_id; return $this->area_id;
} }
} }

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
/** /**
* Class AreaEvent * Class AreaEvent
* @package Thelia\Core\Event\Shipping * @package Thelia\Core\Event\Shipping

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaRemoveCountryEvent * Class AreaRemoveCountryEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaUpdateEvent * Class AreaUpdateEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Area; namespace Thelia\Core\Event\Area;
/** /**
* Class AreaUpdatePostageEvent * Class AreaUpdatePostageEvent
* @package Thelia\Core\Event\Area * @package Thelia\Core\Event\Area
@@ -34,7 +33,7 @@ class AreaUpdatePostageEvent extends AreaEvent
protected $area_id; protected $area_id;
protected $postage; protected $postage;
function __construct($area_id) public function __construct($area_id)
{ {
$this->area_id = $area_id; $this->area_id = $area_id;
} }
@@ -79,7 +78,4 @@ class AreaUpdatePostageEvent extends AreaEvent
return $this->postage; return $this->postage;
} }
} }

View File

@@ -25,7 +25,6 @@ namespace Thelia\Core\Event\Cache;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
/** /**
* Class CacheEvent * Class CacheEvent
* @package Thelia\Core\Event\Cache * @package Thelia\Core\Event\Cache
@@ -63,5 +62,4 @@ class CacheEvent extends ActionEvent
return $this->dir; return $this->dir;
} }
} }

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\Content; namespace Thelia\Core\Event\Content;
use Thelia\Model\Content; use Thelia\Model\Content;
/** /**
* Class ContentAddFolderEvent * Class ContentAddFolderEvent
* @package Thelia\Core\Event\Content * @package Thelia\Core\Event\Content
@@ -61,6 +60,4 @@ class ContentAddFolderEvent extends ContentEvent
return $this->folderId; return $this->folderId;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Content; namespace Thelia\Core\Event\Content;
/** /**
* Class ContentRemoveFolderEvent * Class ContentRemoveFolderEvent
* @package Thelia\Core\Event\Content * @package Thelia\Core\Event\Content

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Country; namespace Thelia\Core\Event\Country;
/** /**
* Class CountryCreateEvent * Class CountryCreateEvent
* @package Thelia\Core\Event\Country * @package Thelia\Core\Event\Country
@@ -150,5 +149,4 @@ class CountryCreateEvent extends CountryEvent
return $this->area; return $this->area;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Country; namespace Thelia\Core\Event\Country;
/** /**
* Class CountryDeleteEvent * Class CountryDeleteEvent
* @package Thelia\Core\Event\Country * @package Thelia\Core\Event\Country
@@ -36,7 +35,7 @@ class CountryDeleteEvent extends CountryEvent
*/ */
protected $country_id; protected $country_id;
function __construct($country_id) public function __construct($country_id)
{ {
$this->country_id = $country_id; $this->country_id = $country_id;
} }

View File

@@ -25,7 +25,6 @@ namespace Thelia\Core\Event\Country;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Country; use Thelia\Model\Country;
/** /**
* Class CountryEvent * Class CountryEvent
* @package Thelia\Core\Event\Country * @package Thelia\Core\Event\Country
@@ -38,7 +37,7 @@ class CountryEvent extends ActionEvent
*/ */
protected $country; protected $country;
function __construct(Country $country = null) public function __construct(Country $country = null)
{ {
$this->country = $country; $this->country = $country;
} }
@@ -69,5 +68,4 @@ class CountryEvent extends ActionEvent
return null !== $this->country; return null !== $this->country;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Country; namespace Thelia\Core\Event\Country;
/** /**
* Class CountryToggleDefaultEvent * Class CountryToggleDefaultEvent
* @package Thelia\Core\Event\Country * @package Thelia\Core\Event\Country
@@ -33,7 +32,7 @@ class CountryToggleDefaultEvent extends CountryEvent
{ {
protected $country_id; protected $country_id;
function __construct($country_id) public function __construct($country_id)
{ {
$this->country_id = $country_id; $this->country_id = $country_id;
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Country; namespace Thelia\Core\Event\Country;
/** /**
* Class CountryUpdateEvent * Class CountryUpdateEvent
* @package Thelia\Core\Event\Country * @package Thelia\Core\Event\Country
@@ -37,7 +36,7 @@ class CountryUpdateEvent extends CountryCreateEvent
protected $description; protected $description;
protected $postscriptum; protected $postscriptum;
function __construct($country_id) public function __construct($country_id)
{ {
$this->country_id = $country_id; $this->country_id = $country_id;
} }
@@ -114,7 +113,4 @@ class CountryUpdateEvent extends CountryCreateEvent
return $this->country_id; return $this->country_id;
} }
} }

View File

@@ -25,7 +25,6 @@ namespace Thelia\Core\Event\Module;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Module; use Thelia\Model\Module;
/** /**
* Class ModuleEvent * Class ModuleEvent
* @package Thelia\Core\Event\Module * @package Thelia\Core\Event\Module
@@ -38,7 +37,7 @@ class ModuleEvent extends ActionEvent
*/ */
protected $module; protected $module;
function __construct(Module $module = null) public function __construct(Module $module = null)
{ {
$this->module = $module; $this->module = $module;
} }
@@ -63,7 +62,4 @@ class ModuleEvent extends ActionEvent
return $this->module; return $this->module;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Module; namespace Thelia\Core\Event\Module;
/** /**
* Class ModuleToggleActivationEvent * Class ModuleToggleActivationEvent
* @package Thelia\Core\Event\Module * @package Thelia\Core\Event\Module
@@ -36,7 +35,7 @@ class ModuleToggleActivationEvent extends ModuleEvent
*/ */
protected $module_id; protected $module_id;
function __construct($module_id) public function __construct($module_id)
{ {
$this->module_id = $module_id; $this->module_id = $module_id;
} }
@@ -61,7 +60,4 @@ class ModuleToggleActivationEvent extends ModuleEvent
return $this->module_id; return $this->module_id;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event; namespace Thelia\Core\Event;
/** /**
* Class PdfEvent * Class PdfEvent
* @package Thelia\Core\Event * @package Thelia\Core\Event
@@ -189,5 +188,4 @@ class PdfEvent extends ActionEvent
return $this->unicode; return $this->unicode;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Product; namespace Thelia\Core\Event\Product;
class ProductCreateEvent extends ProductEvent class ProductCreateEvent extends ProductEvent
{ {
protected $ref; protected $ref;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Product; namespace Thelia\Core\Event\Product;
class ProductDeleteEvent extends ProductEvent class ProductDeleteEvent extends ProductEvent
{ {
public function __construct($product_id) public function __construct($product_id)

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\ShippingZone; namespace Thelia\Core\Event\ShippingZone;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
/** /**
* Class ShippingZoneAddAreaEvent * Class ShippingZoneAddAreaEvent
* @package Thelia\Core\Event\ShippingZone * @package Thelia\Core\Event\ShippingZone
@@ -35,7 +34,7 @@ class ShippingZoneAddAreaEvent extends ActionEvent
protected $area_id; protected $area_id;
protected $shopping_zone_id; protected $shopping_zone_id;
function __construct($area_id, $shopping_zone_id) public function __construct($area_id, $shopping_zone_id)
{ {
$this->area_id = $area_id; $this->area_id = $area_id;
$this->shopping_zone_id = $shopping_zone_id; $this->shopping_zone_id = $shopping_zone_id;
@@ -81,7 +80,4 @@ class ShippingZoneAddAreaEvent extends ActionEvent
return $this->shopping_zone_id; return $this->shopping_zone_id;
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\ShippingZone; namespace Thelia\Core\Event\ShippingZone;
/** /**
* Class ShippingZoneRemoveAreaEvent * Class ShippingZoneRemoveAreaEvent
* @package Thelia\Core\Event\ShippingZone * @package Thelia\Core\Event\ShippingZone

View File

@@ -118,5 +118,4 @@ class TaxRuleEvent extends ActionEvent
return $this->taxList; return $this->taxList;
} }
} }

View File

@@ -183,7 +183,6 @@ final class TheliaEvents
const FOLDER_TOGGLE_VISIBILITY = "action.toggleFolderVisibility"; const FOLDER_TOGGLE_VISIBILITY = "action.toggleFolderVisibility";
const FOLDER_UPDATE_POSITION = "action.updateFolderPosition"; const FOLDER_UPDATE_POSITION = "action.updateFolderPosition";
const BEFORE_CREATEFOLDER = "action.before_createFolder"; const BEFORE_CREATEFOLDER = "action.before_createFolder";
const AFTER_CREATEFOLDER = "action.after_createFolder"; const AFTER_CREATEFOLDER = "action.after_createFolder";
@@ -204,7 +203,6 @@ final class TheliaEvents
const CONTENT_ADD_FOLDER = "action.contentAddFolder"; const CONTENT_ADD_FOLDER = "action.contentAddFolder";
const CONTENT_REMOVE_FOLDER = "action.contentRemoveFolder"; const CONTENT_REMOVE_FOLDER = "action.contentRemoveFolder";
const BEFORE_CREATECONTENT = "action.before_createContent"; const BEFORE_CREATECONTENT = "action.before_createContent";
const AFTER_CREATECONTENT = "action.after_createContent"; const AFTER_CREATECONTENT = "action.after_createContent";
@@ -222,7 +220,6 @@ final class TheliaEvents
const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault"; const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault";
//const COUNTRY_UPDATE_POSITION = "action.updateFolderPosition"; //const COUNTRY_UPDATE_POSITION = "action.updateFolderPosition";
const BEFORE_CREATECOUNTRY = "action.before_createCountry"; const BEFORE_CREATECOUNTRY = "action.before_createCountry";
const AFTER_CREATECOUNTRY = "action.after_createCountry"; const AFTER_CREATECOUNTRY = "action.after_createCountry";

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection; use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\AreaQuery; use Thelia\Model\AreaQuery;
/** /**
* Class Area * Class Area
* @package Thelia\Core\Template\Loop * @package Thelia\Core\Template\Loop
@@ -112,8 +111,7 @@ class Area extends BaseLoop
$withoutZone = $this->getWithout_zone(); $withoutZone = $this->getWithout_zone();
if($withoutZone) if ($withoutZone) {
{
$search->joinAreaDeliveryModule('without_zone', Criteria::LEFT_JOIN) $search->joinAreaDeliveryModule('without_zone', Criteria::LEFT_JOIN)
->addJoinCondition('without_zone', 'delivery_module_id '.Criteria::EQUAL.' ?', $withoutZone, null, \PDO::PARAM_INT) ->addJoinCondition('without_zone', 'delivery_module_id '.Criteria::EQUAL.' ?', $withoutZone, null, \PDO::PARAM_INT)
->where('`without_zone`.delivery_module_id '.Criteria::ISNULL); ->where('`without_zone`.delivery_module_id '.Criteria::ISNULL);
@@ -140,5 +138,4 @@ class Area extends BaseLoop
return $loopResult; return $loopResult;
} }
} }

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\FolderQuery; use Thelia\Model\FolderQuery;
use Thelia\Type\BooleanOrBothType; use Thelia\Type\BooleanOrBothType;
/** /**
* Class FolderPath * Class FolderPath
* @package Thelia\Core\Template\Loop * @package Thelia\Core\Template\Loop
@@ -156,5 +155,4 @@ class FolderPath extends BaseI18nLoop
return $loopResult; return $loopResult;
} }
} }

View File

@@ -35,8 +35,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\Map\CountryTableMap; use Thelia\Model\Map\CountryTableMap;
use Thelia\Model\Map\TaxRuleCountryTableMap; use Thelia\Model\Map\TaxRuleCountryTableMap;
use Thelia\Model\Map\TaxTableMap; use Thelia\Model\Map\TaxTableMap;
use Thelia\Type\TypeCollection;
use Thelia\Type;
use Thelia\Model\TaxRuleCountryQuery; use Thelia\Model\TaxRuleCountryQuery;
/** /**
@@ -152,8 +150,6 @@ class TaxRuleCountry extends BaseI18nLoop
; ;
} }
$loopResult->addRow($loopResultRow); $loopResult->addRow($loopResultRow);
} }

View File

@@ -32,7 +32,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\Base\TemplateQuery; use Thelia\Model\Base\TemplateQuery;
use Thelia\Type;
/** /**
* *

View File

@@ -172,6 +172,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
self::$dataAccessCache['defaultCountry'] = $defaultCountry; self::$dataAccessCache['defaultCountry'] = $defaultCountry;
}*/ }*/
$defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1); $defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1);
return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry); return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry);
} }
} }

View File

@@ -28,7 +28,6 @@ use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm; use Thelia\Form\BaseForm;
/** /**
* Class AreaCountryForm * Class AreaCountryForm
* @package Thelia\Form\Area * @package Thelia\Form\Area

View File

@@ -26,7 +26,6 @@ use Thelia\Core\Translation\Translator;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm; use Thelia\Form\BaseForm;
/** /**
* Class AreaCreateForm * Class AreaCreateForm
* @package Thelia\Form\Shipping * @package Thelia\Form\Shipping

View File

@@ -25,7 +25,6 @@ namespace Thelia\Form\Area;
use Symfony\Component\Validator\Constraints\GreaterThan; use Symfony\Component\Validator\Constraints\GreaterThan;
use Thelia\Form\Area\AreaCreateForm; use Thelia\Form\Area\AreaCreateForm;
/** /**
* Class AreaModificationForm * Class AreaModificationForm
* @package Thelia\Form\Shipping * @package Thelia\Form\Shipping

View File

@@ -29,7 +29,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm; use Thelia\Form\BaseForm;
use Thelia\Core\Translation\Translator; use Thelia\Core\Translation\Translator;
/** /**
* Class AreaPostageForm * Class AreaPostageForm
* @package Thelia\Form\Area * @package Thelia\Form\Area

View File

@@ -23,8 +23,6 @@
namespace Thelia\Form; namespace Thelia\Form;
use Symfony\Component\Validator\Constraints\GreaterThan; use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Core\Translation\Translator;
class CountryModificationForm extends CountryCreationForm class CountryModificationForm extends CountryCreationForm
{ {

View File

@@ -28,7 +28,6 @@ use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm; use Thelia\Form\BaseForm;
/** /**
* Class ShippingZoneAddArea * Class ShippingZoneAddArea
* @package Thelia\Form\ShippingZone * @package Thelia\Form\ShippingZone

View File

@@ -23,7 +23,6 @@
namespace Thelia\Form\ShippingZone; namespace Thelia\Form\ShippingZone;
/** /**
* Class ShippingZoneRemoveArea * Class ShippingZoneRemoveArea
* @package Thelia\Form\ShippingZone * @package Thelia\Form\ShippingZone

View File

@@ -24,8 +24,6 @@ namespace Thelia\Form;
use Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Core\Translation\Translator;
use Thelia\Model\CountryQuery;
class TaxRuleCreationForm extends BaseForm class TaxRuleCreationForm extends BaseForm
{ {

View File

@@ -53,7 +53,6 @@ abstract class BaseModule extends ContainerAware
} }
public function activate($moduleModel = null) public function activate($moduleModel = null)
{ {
if (null === $moduleModel) { if (null === $moduleModel) {
@@ -215,7 +214,6 @@ abstract class BaseModule extends ContainerAware
return $moduleModel; return $moduleModel;
} }
public function getCode() public function getCode()
{ {
if (null === $this->reflected) { if (null === $this->reflected) {
@@ -225,8 +223,8 @@ abstract class BaseModule extends ContainerAware
return basename(dirname($this->reflected->getFileName())); return basename(dirname($this->reflected->getFileName()));
} }
public function install(){ public function install()
{
} }
public function preActivation(ConnectionInterface $con = null) public function preActivation(ConnectionInterface $con = null)

View File

@@ -23,7 +23,6 @@
namespace Thelia\Module\Exception; namespace Thelia\Module\Exception;
/** /**
* Class InvalidXmlDocumentException * Class InvalidXmlDocumentException
* @package Thelia\Module\Exception * @package Thelia\Module\Exception

View File

@@ -24,7 +24,6 @@
namespace Thelia\Module; namespace Thelia\Module;
use Thelia\Module\Exception\InvalidXmlDocumentException; use Thelia\Module\Exception\InvalidXmlDocumentException;
/** /**
* Class ModuleDescriptorValidator * Class ModuleDescriptorValidator
* @package Thelia\Module * @package Thelia\Module
@@ -52,7 +51,8 @@ class ModuleDescriptorValidator
throw new InvalidXmlDocumentException(sprintf("%s file is not a valid file", $xml_file)); throw new InvalidXmlDocumentException(sprintf("%s file is not a valid file", $xml_file));
} }
public function getDescriptor($xml_file) { public function getDescriptor($xml_file)
{
$this->validate($xml_file); $this->validate($xml_file);
return @simplexml_load_file($xml_file); return @simplexml_load_file($xml_file);

View File

@@ -32,7 +32,6 @@ use Thelia\Model\Module;
use Thelia\Model\ModuleI18n; use Thelia\Model\ModuleI18n;
use Thelia\Model\ModuleQuery; use Thelia\Model\ModuleQuery;
/** /**
* Class ModuleManagement * Class ModuleManagement
* @package Thelia\Module * @package Thelia\Module
@@ -88,8 +87,7 @@ class ModuleManagement
private function saveDescription(Module $module,\SimpleXMLElement $content, ConnectionInterface $con) private function saveDescription(Module $module,\SimpleXMLElement $content, ConnectionInterface $con)
{ {
foreach($content->descriptive as $description) foreach ($content->descriptive as $description) {
{
$locale = $description->attributes()->locale; $locale = $description->attributes()->locale;
$moduleI18n = new ModuleI18n(); $moduleI18n = new ModuleI18n();
@@ -115,7 +113,6 @@ class ModuleManagement
return BaseModule::CLASSIC_MODULE_TYPE; return BaseModule::CLASSIC_MODULE_TYPE;
} }
} }
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Tests\Action; namespace Thelia\Tests\Action;
/** /**
* Class BaseAction * Class BaseAction
* @package Thelia\Tests\Action\ImageTest * @package Thelia\Tests\Action\ImageTest

View File

@@ -36,7 +36,6 @@ use Thelia\Model\ContentFolderQuery;
use Thelia\Model\ContentQuery; use Thelia\Model\ContentQuery;
use Thelia\Model\FolderQuery; use Thelia\Model\FolderQuery;
/** /**
* Class ContentTest * Class ContentTest
* @package Thelia\Tests\Action * @package Thelia\Tests\Action

View File

@@ -31,7 +31,6 @@ use Thelia\Core\Event\Folder\FolderUpdateEvent;
use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdatePositionEvent;
use Thelia\Model\FolderQuery; use Thelia\Model\FolderQuery;
/** /**
* Class FolderTest * Class FolderTest
* @package Thelia\Tests\Action\ImageTest * @package Thelia\Tests\Action\ImageTest
@@ -73,8 +72,6 @@ class FolderTest extends BaseAction
{ {
$folder = $this->getRandomFolder(); $folder = $this->getRandomFolder();
$visible = !$folder->getVisible(); $visible = !$folder->getVisible();
$event = new FolderUpdateEvent($folder->getId()); $event = new FolderUpdateEvent($folder->getId());