diff --git a/ws_customerspecialty.zip b/ws_customerspecialty.zip new file mode 100644 index 0000000..00a15ee Binary files /dev/null and b/ws_customerspecialty.zip differ diff --git a/ws_customerspecialty/config_nl.xml b/ws_customerspecialty/config_nl.xml new file mode 100644 index 0000000..4cdcce4 --- /dev/null +++ b/ws_customerspecialty/config_nl.xml @@ -0,0 +1,11 @@ + + + ws_customerspecialty + + + + + + 1 + 0 + \ No newline at end of file diff --git a/ws_customerspecialty/logo.png b/ws_customerspecialty/logo.png new file mode 100644 index 0000000..3087027 Binary files /dev/null and b/ws_customerspecialty/logo.png differ diff --git a/ws_customerspecialty/src/Controller/CustomerSpecialtyController.php b/ws_customerspecialty/src/Controller/CustomerSpecialtyController.php index a882aaa..e85a17d 100644 --- a/ws_customerspecialty/src/Controller/CustomerSpecialtyController.php +++ b/ws_customerspecialty/src/Controller/CustomerSpecialtyController.php @@ -150,7 +150,7 @@ class CustomerSpecialtyController extends FrameworkBundleAdminController ]; } - private function getCommandBus() + protected function getCommandBus() { return $this->get('prestashop.core.command_bus'); } diff --git a/ws_customerspecialty/src/Form/DataHandler/CustomerSpecialtyDataHandler.php b/ws_customerspecialty/src/Form/DataHandler/CustomerSpecialtyDataHandler.php index 5ee368b..bb7da9e 100644 --- a/ws_customerspecialty/src/Form/DataHandler/CustomerSpecialtyDataHandler.php +++ b/ws_customerspecialty/src/Form/DataHandler/CustomerSpecialtyDataHandler.php @@ -2,7 +2,7 @@ namespace Websmid\CustomerSpecialty\Form\DataHandler; -use PrestaShop\PrestaShop\Core\Form\FormDataHandlerInterface; +use PrestaShop\PrestaShop\Core\Form\IdentifiableObject\DataHandler\FormDataHandlerInterface; use Websmid\CustomerSpecialty\Command\SaveCustomerSpecialtyCommand; use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; diff --git a/ws_customerspecialty/src/Form/DataProvider/CustomerSpecialtyDataProvider.php b/ws_customerspecialty/src/Form/DataProvider/CustomerSpecialtyDataProvider.php index 23ccf2c..79b6946 100644 --- a/ws_customerspecialty/src/Form/DataProvider/CustomerSpecialtyDataProvider.php +++ b/ws_customerspecialty/src/Form/DataProvider/CustomerSpecialtyDataProvider.php @@ -2,7 +2,7 @@ namespace Websmid\CustomerSpecialty\Form\DataProvider; -use PrestaShop\PrestaShop\Core\Form\FormDataProviderInterface; +use PrestaShop\PrestaShop\Core\Form\IdentifiableObject\DataProvider\FormDataProviderInterface; use Websmid\CustomerSpecialty\Entity\CustomerSpecialty; use Websmid\CustomerSpecialty\Entity\CustomerSpecialtyLang; use Doctrine\ORM\EntityManagerInterface; @@ -10,7 +10,7 @@ use PrestaShop\PrestaShop\Adapter\SymfonyContainer; final class CustomerSpecialtyDataProvider implements FormDataProviderInterface { - public function getDefaultData(): array + public function getDefaultData() { return [ 'title' => [], @@ -18,7 +18,7 @@ final class CustomerSpecialtyDataProvider implements FormDataProviderInterface ]; } - public function getData($id): array + public function getData($id) { $entityManager = SymfonyContainer::getInstance()->get('doctrine.orm.entity_manager'); diff --git a/ws_customerspecialty/src/Grid/Definition/Factory/CustomerSpecialtyGridDefinitionFactory.php b/ws_customerspecialty/src/Grid/Definition/Factory/CustomerSpecialtyGridDefinitionFactory.php index a110c39..0678ad4 100644 --- a/ws_customerspecialty/src/Grid/Definition/Factory/CustomerSpecialtyGridDefinitionFactory.php +++ b/ws_customerspecialty/src/Grid/Definition/Factory/CustomerSpecialtyGridDefinitionFactory.php @@ -68,8 +68,9 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto ->setName($this->trans('Edit', [], 'Admin.Actions')) ->setIcon('edit') ->setOptions([ - 'route' => 'customerspecialty_edit', - 'route_param_name' => 'idCustomerSpecialty', + 'route' => 'customerspecialty_edit', + 'route_param_name' => 'idCustomerSpecialty', + 'route_param_field' => 'id_ws_customerspecialty', ]) ) ->add( @@ -77,8 +78,9 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto ->setName($this->trans('Move up', [], 'Modules.Wscustomerspecialty.Admin')) ->setIcon('arrow_upward') ->setOptions([ - 'route' => 'customerspecialty_move_up', - 'route_param_name' => 'idCustomerSpecialty', + 'route' => 'customerspecialty_move_up', + 'route_param_name' => 'idCustomerSpecialty', + 'route_param_field' => 'id_ws_customerspecialty', ]) ) ->add( @@ -86,8 +88,9 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto ->setName($this->trans('Move down', [], 'Modules.Wscustomerspecialty.Admin')) ->setIcon('arrow_downward') ->setOptions([ - 'route' => 'customerspecialty_move_down', - 'route_param_name' => 'idCustomerSpecialty', + 'route' => 'customerspecialty_move_down', + 'route_param_name' => 'idCustomerSpecialty', + 'route_param_field' => 'id_ws_customerspecialty', ]) ), ]) diff --git a/ws_customerspecialty/src/Grid/Filters/CustomerSpecialtyFilters.php b/ws_customerspecialty/src/Grid/Filters/CustomerSpecialtyFilters.php index b33978c..5196545 100644 --- a/ws_customerspecialty/src/Grid/Filters/CustomerSpecialtyFilters.php +++ b/ws_customerspecialty/src/Grid/Filters/CustomerSpecialtyFilters.php @@ -2,7 +2,7 @@ namespace Websmid\CustomerSpecialty\Grid\Filters; -use PrestaShop\PrestaShop\Core\Grid\Filter\Filters; +use PrestaShop\PrestaShop\Core\Search\Filters; use Websmid\CustomerSpecialty\Grid\Definition\Factory\CustomerSpecialtyGridDefinitionFactory; class CustomerSpecialtyFilters extends Filters