This commit is contained in:
Manuel Raynaud
2014-04-10 12:05:45 +02:00
parent caf22404f5
commit 2532a3bb4b
10 changed files with 61 additions and 69 deletions

View File

@@ -23,7 +23,6 @@
namespace Thelia\Action; namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;

View File

@@ -1,4 +1,4 @@
<?php <?php
return array( return array(
// 'an english string' => 'The displayed english string', // 'an english string' => 'The displayed english string',
); );

View File

@@ -1,4 +1,4 @@
<?php <?php
return array( return array(
// 'an english string' => 'La traduction française de la chaine', // 'an english string' => 'La traduction française de la chaine',
); );

View File

@@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing" <routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<!-- <!--
if a /admin/module/%%CLASSNAME_LOWER%%/ route is provided, a "Configuration" button will be displayed if a /admin/module/%%CLASSNAME_LOWER%%/ route is provided, a "Configuration" button will be displayed
for the module in the module list. Clicking this button will invoke this route. for the module in the module list. Clicking this button will invoke this route.
<route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%"> <route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%">
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourConfigurationController::methodName</default> <default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourConfigurationController::methodName</default>
</route> </route>
<route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%/route-name"> <route id="my_route_id" path="/admin/module/%%CLASSNAME_LOWER%%/route-name">
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourAdminController::methodName</default> <default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourAdminController::methodName</default>
</route> </route>
<route id="my_route_id" path="/my/route/name"> <route id="my_route_id" path="/my/route/name">
<default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourOtherController::methodName</default> <default key="_controller">%%NAMESPACE%%\Full\Class\Name\Of\YourOtherController::methodName</default>
</route> </route>
...add as many routes as required. ...add as many routes as required.
<route> <route>
... ...
</route> </route>
--> -->
</routes> </routes>

View File

@@ -221,7 +221,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
// Pass it to the parser // Pass it to the parser
$this->getParserContext()->addForm($changeForm); $this->getParserContext()->addForm($changeForm);
} }
if (false !== $error_msg) { if (false !== $error_msg) {
$this->setupFormErrorContext( $this->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)), $this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
@@ -229,7 +229,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
$updateSeoForm, $updateSeoForm,
$ex $ex
); );
// At this point, the form has errors, and should be redisplayed. // At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate(); return $this->renderEditionTemplate();
} }

View File

@@ -26,7 +26,6 @@ namespace Thelia\Core\Event\Cart;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\CartItem; use Thelia\Model\CartItem;
/** /**
* Class CartItemDuplicationItem * Class CartItemDuplicationItem
* @package Thelia\Core\Event\Cart * @package Thelia\Core\Event\Cart
@@ -44,7 +43,7 @@ class CartItemDuplicationItem extends ActionEvent
*/ */
protected $newItem; protected $newItem;
function __construct(CartItem $newItem, CartItem $oldItem) public function __construct(CartItem $newItem, CartItem $oldItem)
{ {
$this->newItem = $newItem; $this->newItem = $newItem;
$this->oldItem = $oldItem; $this->oldItem = $oldItem;
@@ -66,5 +65,4 @@ class CartItemDuplicationItem extends ActionEvent
return $this->oldItem; return $this->oldItem;
} }
}
}

View File

@@ -81,8 +81,6 @@ class OrderEvent extends ActionEvent
return $this->cartItemId; return $this->cartItemId;
} }
/** /**
* @param Order $order * @param Order $order
*/ */

View File

@@ -63,7 +63,7 @@ interface ParserInterface
* Create a variable that will be available in the templates * Create a variable that will be available in the templates
* *
* @param string $variable the variable name * @param string $variable the variable name
* @param mixed $value the value of the variable * @param mixed $value the value of the variable
*/ */
public function assign($variable, $value); public function assign($variable, $value);
} }

View File

@@ -31,8 +31,6 @@ class OrderProduct extends BaseOrderProduct
return $this->cartIemId; return $this->cartIemId;
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

View File

@@ -200,8 +200,8 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* TODO : clarify the purpose of ModuleImage. How this table will be used elswhere in Thelia ? * TODO : clarify the purpose of ModuleImage. How this table will be used elswhere in Thelia ?
* TODO : this method doesn't take care of internationalization. This is a bug. * TODO : this method doesn't take care of internationalization. This is a bug.
* *
* @param Module $module the module * @param Module $module the module
* @param string $folderPath the image folder path * @param string $folderPath the image folder path
* @param ConnectionInterface $con * @param ConnectionInterface $con
* *
* @throws \Thelia\Exception\ModuleException * @throws \Thelia\Exception\ModuleException
@@ -300,10 +300,11 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
/** /**
* Check if this module is the payment module for a given order * Check if this module is the payment module for a given order
* *
* @param Order $order an order * @param Order $order an order
* @return bool true if this module is the payment module for the given order. * @return bool true if this module is the payment module for the given order.
*/ */
public function isPaymentModuleFor(Order $order) { public function isPaymentModuleFor(Order $order)
{
$model = $this->getModuleModel(); $model = $this->getModuleModel();
return $order->getPaymentModuleId() == $model->getId(); return $order->getPaymentModuleId() == $model->getId();
@@ -312,10 +313,11 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
/** /**
* Check if this module is the delivery module for a given order * Check if this module is the delivery module for a given order
* *
* @param Order $order an order * @param Order $order an order
* @return bool true if this module is the delivery module for the given order. * @return bool true if this module is the delivery module for the given order.
*/ */
public function isDeliveryModuleFor(Order $order) { public function isDeliveryModuleFor(Order $order)
{
$model = $this->getModuleModel(); $model = $this->getModuleModel();
return $order->getDeliveryModuleId() == $model->getId(); return $order->getDeliveryModuleId() == $model->getId();
@@ -327,14 +329,14 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* get the total amount of an order already stored in the database. For such orders, use * get the total amount of an order already stored in the database. For such orders, use
* Order::getTotalAmount() method. * Order::getTotalAmount() method.
* *
* @param bool $with_tax if true, to total price will include tax amount * @param bool $with_tax if true, to total price will include tax amount
* @param bool $with_discount if true, the total price will include discount, if any * @param bool $with_discount if true, the total price will include discount, if any
* @param bool $with_postage if true, the total price will include the delivery costs, if any. * @param bool $with_postage if true, the total price will include the delivery costs, if any.
* *
* @return float|int the current order amount. * @return float|int the current order amount.
*/ */
public function getCurrentOrderTotalAmount($with_tax = true, $with_discount = true, $with_postage = true) { public function getCurrentOrderTotalAmount($with_tax = true, $with_discount = true, $with_postage = true)
{
/** @var Session $session */ /** @var Session $session */
$session = $this->getRequest()->getSession(); $session = $this->getRequest()->getSession();
@@ -420,7 +422,6 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
public function preActivation(ConnectionInterface $con = null) public function preActivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.
return true; return true;
} }
@@ -437,17 +438,15 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
/** /**
* This method is called before the module de-activation, and may prevent it by returning false. * This method is called before the module de-activation, and may prevent it by returning false.
* *
* @param ConnectionInterface $con * @param ConnectionInterface $con
* @return bool true to continue module de-activation, false to prevent it. * @return bool true to continue module de-activation, false to prevent it.
*/ */
public function preDeactivation(ConnectionInterface $con = null) public function preDeactivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.
return true; return true;
} }
public function postDeactivation(ConnectionInterface $con = null) public function postDeactivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.
@@ -458,7 +457,7 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* to delete its data. * to delete its data.
* *
* @param ConnectionInterface $con * @param ConnectionInterface $con
* @param bool $deleteModuleData if true, the module should remove all its data from the system. * @param bool $deleteModuleData if true, the module should remove all its data from the system.
*/ */
public function destroy(ConnectionInterface $con = null, $deleteModuleData = false) public function destroy(ConnectionInterface $con = null, $deleteModuleData = false)
{ {