<?php declare(strict_types=1);
namespace EnetPickupDate;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\System\CustomField\CustomFieldTypes;
class EnetPickupDate extends Plugin
{
public function install(Plugin\Context\InstallContext $context): void
{
$customFieldSetRepository = $this->container->get('custom_field_set.repository');
$customFieldSetRepository->create(
[
[
'name' => 'enet_pickupdate',
'config' => [
'label' => [
'en-GB' => 'Pickup Date',
'de-DE' => 'Abholdatum',
],
],
'customFields' => [
[
'name' => 'enet_pickupdate',
'type' => CustomFieldTypes::TEXT,
'config' => [
'componentName' => 'sw-field',
'customFieldType' => 'text',
'label' => [
'en-GB' => 'Pickup Date',
'de-DE' => 'Abholzeitraum'
]
],
'active' => true
]
],
'relations' => [
['entityName' => 'order']
]
]
],
$context->getContext()
);
}
}