vendor/shopware/core/Framework/Event/EventAction/EventActionEntity.php line 69

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\Event\EventAction;
  3. use Shopware\Core\Content\Rule\RuleCollection;
  4. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  5. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  7. use Shopware\Core\Framework\Feature;
  8. use Shopware\Core\System\SalesChannel\SalesChannelCollection;
  9. /**
  10.  * @deprecated tag:v6.5.0 - Will be removed in v6.5.0.
  11.  */
  12. class EventActionEntity extends Entity
  13. {
  14.     use EntityIdTrait;
  15.     use EntityCustomFieldsTrait;
  16.     /**
  17.      * @var string
  18.      */
  19.     protected $eventName;
  20.     /**
  21.      * @var string|null
  22.      */
  23.     protected $title;
  24.     /**
  25.      * @var string
  26.      */
  27.     protected $actionName;
  28.     /**
  29.      * @var bool
  30.      */
  31.     protected $active true;
  32.     /**
  33.      * @var array|null
  34.      */
  35.     protected $config;
  36.     /**
  37.      * @var RuleCollection|null
  38.      */
  39.     protected $rules;
  40.     /**
  41.      * @var SalesChannelCollection|null
  42.      */
  43.     protected $salesChannels;
  44.     public function getId(): string
  45.     {
  46.         Feature::triggerDeprecationOrThrow(
  47.             'v6.5.0.0',
  48.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  49.         );
  50.         return $this->id;
  51.     }
  52.     public function setId(string $id): void
  53.     {
  54.         Feature::triggerDeprecationOrThrow(
  55.             'v6.5.0.0',
  56.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  57.         );
  58.         $this->id $id;
  59.         $this->_uniqueIdentifier $id;
  60.     }
  61.     public function getCustomFields(): ?array
  62.     {
  63.         Feature::triggerDeprecationOrThrow(
  64.             'v6.5.0.0',
  65.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  66.         );
  67.         return $this->customFields;
  68.     }
  69.     public function setCustomFields(?array $customFields): void
  70.     {
  71.         Feature::triggerDeprecationOrThrow(
  72.             'v6.5.0.0',
  73.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  74.         );
  75.         $this->customFields $customFields;
  76.     }
  77.     public function getEventName(): string
  78.     {
  79.         Feature::triggerDeprecationOrThrow(
  80.             'v6.5.0.0',
  81.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  82.         );
  83.         return $this->eventName;
  84.     }
  85.     public function setEventName(string $eventName): void
  86.     {
  87.         Feature::triggerDeprecationOrThrow(
  88.             'v6.5.0.0',
  89.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  90.         );
  91.         $this->eventName $eventName;
  92.     }
  93.     public function getActionName(): string
  94.     {
  95.         Feature::triggerDeprecationOrThrow(
  96.             'v6.5.0.0',
  97.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  98.         );
  99.         return $this->actionName;
  100.     }
  101.     public function setActionName(string $actionName): void
  102.     {
  103.         Feature::triggerDeprecationOrThrow(
  104.             'v6.5.0.0',
  105.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  106.         );
  107.         $this->actionName $actionName;
  108.     }
  109.     public function getConfig(): ?array
  110.     {
  111.         Feature::triggerDeprecationOrThrow(
  112.             'v6.5.0.0',
  113.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  114.         );
  115.         return $this->config;
  116.     }
  117.     public function setConfig(array $config): void
  118.     {
  119.         Feature::triggerDeprecationOrThrow(
  120.             'v6.5.0.0',
  121.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  122.         );
  123.         $this->config $config;
  124.     }
  125.     public function isActive(): bool
  126.     {
  127.         Feature::triggerDeprecationOrThrow(
  128.             'v6.5.0.0',
  129.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  130.         );
  131.         return $this->active;
  132.     }
  133.     public function setActive(bool $active): void
  134.     {
  135.         Feature::triggerDeprecationOrThrow(
  136.             'v6.5.0.0',
  137.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  138.         );
  139.         $this->active $active;
  140.     }
  141.     public function getRules(): ?RuleCollection
  142.     {
  143.         Feature::triggerDeprecationOrThrow(
  144.             'v6.5.0.0',
  145.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  146.         );
  147.         return $this->rules;
  148.     }
  149.     public function setRules(RuleCollection $rules): void
  150.     {
  151.         Feature::triggerDeprecationOrThrow(
  152.             'v6.5.0.0',
  153.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  154.         );
  155.         $this->rules $rules;
  156.     }
  157.     public function getSalesChannels(): ?SalesChannelCollection
  158.     {
  159.         Feature::triggerDeprecationOrThrow(
  160.             'v6.5.0.0',
  161.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  162.         );
  163.         return $this->salesChannels;
  164.     }
  165.     public function setSalesChannels(SalesChannelCollection $salesChannels): void
  166.     {
  167.         Feature::triggerDeprecationOrThrow(
  168.             'v6.5.0.0',
  169.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  170.         );
  171.         $this->salesChannels $salesChannels;
  172.     }
  173.     public function getTitle(): ?string
  174.     {
  175.         Feature::triggerDeprecationOrThrow(
  176.             'v6.5.0.0',
  177.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  178.         );
  179.         return $this->title;
  180.     }
  181.     public function setTitle(?string $title): void
  182.     {
  183.         Feature::triggerDeprecationOrThrow(
  184.             'v6.5.0.0',
  185.             Feature::deprecatedClassMessage(__CLASS__'v6.5.0.0')
  186.         );
  187.         $this->title $title;
  188.     }
  189. }