3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addCountry' => StoreAddCountryActionModel::class,
35 'addDistributionChannel' => StoreAddDistributionChannelActionModel::class,
36 'addProductSelection' => StoreAddProductSelectionActionModel::class,
37 'addSupplyChannel' => StoreAddSupplyChannelActionModel::class,
38 'changeProductSelectionActive' => StoreChangeProductSelectionActionModel::class,
39 'removeCountry' => StoreRemoveCountryActionModel::class,
40 'removeDistributionChannel' => StoreRemoveDistributionChannelActionModel::class,
41 'removeProductSelection' => StoreRemoveProductSelectionActionModel::class,
42 'removeSupplyChannel' => StoreRemoveSupplyChannelActionModel::class,
43 'setCountries' => StoreSetCountriesActionModel::class,
44 'setCustomField' => StoreSetCustomFieldActionModel::class,
45 'setCustomType' => StoreSetCustomTypeActionModel::class,
46 'setDistributionChannels' => StoreSetDistributionChannelsActionModel::class,
47 'setLanguages' => StoreSetLanguagesActionModel::class,
48 'setName' => StoreSetNameActionModel::class,
49 'setProductSelections' => StoreSetProductSelectionsActionModel::class,
50 'setSupplyChannels' => StoreSetSupplyChannelsActionModel::class,
68 if (is_null($this->action)) {
70 $data = $this->
raw(self::FIELD_ACTION);
74 $this->action = (string) $data;
91 if (is_object($value) && isset($value->$fieldName)) {
93 $discriminatorValue = $value->$fieldName;
94 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
95 return self::$discriminatorClasses[$discriminatorValue];
98 if (is_array($value) && isset($value[$fieldName])) {
100 $discriminatorValue = $value[$fieldName];
101 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
102 return self::$discriminatorClasses[$discriminatorValue];
107 $type = StoreUpdateActionModel::class;