feat(main): Get it running
Still need to fix back office display
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>ws_customerspecialty</name>
|
||||
<displayName><![CDATA[Customer Specialty]]></displayName>
|
||||
<version><![CDATA[1.0.0]]></version>
|
||||
<description><![CDATA[Adds a manageable specialty/profession field to customer accounts, shown in the back office and exposed to order confirmation emails.]]></description>
|
||||
<author><![CDATA[Isabelle Oving-Anno | De Websmid BV]]></author>
|
||||
<tab><![CDATA[]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
</module>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -150,7 +150,7 @@ class CustomerSpecialtyController extends FrameworkBundleAdminController
|
||||
];
|
||||
}
|
||||
|
||||
private function getCommandBus()
|
||||
protected function getCommandBus()
|
||||
{
|
||||
return $this->get('prestashop.core.command_bus');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
+9
-6
@@ -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',
|
||||
])
|
||||
),
|
||||
])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user