<?php declare(strict_types=1);
namespace Okeonline\MyKeje;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Uuid\Uuid;
use Shopware\Core\System\CustomField\CustomFieldTypes;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\System\CustomField\Aggregate\CustomFieldSet\CustomFieldSetEntity;
use Shopware\Core\System\CustomField\Aggregate\CustomFieldSetRelation\CustomFieldSetRelationEntity;
class OkeonlineMyKeje extends Plugin
{
public function install(InstallContext $installContext): void
{
$customFieldSetRepository = $this->container->get('custom_field_set.repository');
$customFieldSetRepository->upsert([
[
'id' => 'a035a6ea0446415295d83b73ff222f06',
'name' => 'oo_order',
'config' => [
'label' => [
'en-GB' => 'Order customFields',
'de-DE' => 'Order customFields',
'nl-NL' => 'Order customFields'
]
],
'relations' => [
[
'id' => '162950ded05d4e77a74b83ba2088b385',
'entityName' => 'order'
]
],
'customFields' => [
[
'id' => '162950ded05d4e77a74b83ba2088b384',
'name' => 'oo_order_origin',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'en-GB' => 'Where does this order originate from?',
'de-DE' => 'Woher stammt diese Bestellung?',
'nl-NL' => 'Waar is deze order geplaatst?'
],
'customFieldPosition' => 1
]
]
]
]
], $installContext->getContext());
}
}