fond-of-impala / company-type-converter
CompanyTypeConverter module
1.1.0
2024-04-24 10:35 UTC
Requires
- php: >=8.0
- fond-of-impala/company-type: ^1.0.0
- fond-of-impala/company-type-converter-extension: ^1.0.0
- fond-of-impala/company-type-role: ^1.0.0
- spryker/company: ^1.0.0
- spryker/company-role: ^1.0
- spryker/company-user: ^2.0.0
- spryker/permission: ^1.2
Requires (Dev)
This package is not auto-updated.
Last update: 2024-10-23 20:05:30 UTC
README
Installation
composer require fond-of-impala/company-type-converter
Configuration
Register plugins in CompanyDependencyProvider
CompanyTypeConverterCompanyPreSavePlugin
CompanyTypeConverterCompanyPostSavePlugin
The CompanyTypeConverterCompanyPreSavePlugin
now supports a blacklist functionality. By default, all converts are whitelisted. After setting up the config
$config[CompanyTypeConverterConstants::COMPANY_TYPE_NON_CONVERTIBLE_ROLE_TYPE_KEYS] = [
'manufacturer' => ['retailer', 'distributor'],
'distributor' => ['manufacturer'],
'retailer' => ['manufacturer']
];
for example the manufacturer can not be converted to a retailer or distributor. The distributor can not be converted as a manufacturer, but he could be converted to a retailer. Same goes for the retailer. He can not converted to a manufacturer but can converted to a distributor.