update OrderDelivery form

This commit is contained in:
Manuel Raynaud
2014-04-16 08:45:50 +02:00
parent 58c9d8ae0d
commit 45adf23bd9

View File

@@ -83,13 +83,13 @@ class OrderDelivery extends BaseForm
if (null === $module) { if (null === $module) {
$context->addViolation(Translator::getInstance()->trans("Delivery module ID not found")); $context->addViolation(Translator::getInstance()->trans("Delivery module ID not found"));
} } else {
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
$moduleReflection = new \ReflectionClass($module->getFullNamespace()); if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) { $context->addViolation(
$context->addViolation( sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode())
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode()) );
); }
} }
} }