3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addRoles' => ChannelAddRolesActionModel::class,
35 'changeDescription' => ChannelChangeDescriptionActionModel::class,
36 'changeKey' => ChannelChangeKeyActionModel::class,
37 'changeName' => ChannelChangeNameActionModel::class,
38 'removeRoles' => ChannelRemoveRolesActionModel::class,
39 'setAddress' => ChannelSetAddressActionModel::class,
40 'setAddressCustomField' => ChannelSetAddressCustomFieldActionModel::class,
41 'setAddressCustomType' => ChannelSetAddressCustomTypeActionModel::class,
42 'setCustomField' => ChannelSetCustomFieldActionModel::class,
43 'setCustomType' => ChannelSetCustomTypeActionModel::class,
44 'setGeoLocation' => ChannelSetGeoLocationActionModel::class,
45 'setRoles' => ChannelSetRolesActionModel::class,
63 if (is_null($this->action)) {
65 $data = $this->
raw(self::FIELD_ACTION);
69 $this->action = (string) $data;
86 if (is_object($value) && isset($value->$fieldName)) {
88 $discriminatorValue = $value->$fieldName;
89 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
90 return self::$discriminatorClasses[$discriminatorValue];
93 if (is_array($value) && isset($value[$fieldName])) {
95 $discriminatorValue = $value[$fieldName];
96 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
97 return self::$discriminatorClasses[$discriminatorValue];
102 $type = ChannelUpdateActionModel::class;