update OrderDelivery form
This commit is contained in:
@@ -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())
|
);
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user