3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addAttribute' => AttributeGroupAddAttributeActionModel::class,
35 'changeName' => AttributeGroupChangeNameActionModel::class,
36 'removeAttribute' => AttributeGroupRemoveAttributeActionModel::class,
37 'setAttributes' => AttributeGroupSetAttributesActionModel::class,
38 'setDescription' => AttributeGroupSetDescriptionActionModel::class,
39 'setKey' => AttributeGroupSetKeyActionModel::class,
57 if (is_null($this->action)) {
59 $data = $this->
raw(self::FIELD_ACTION);
63 $this->action = (string) $data;
80 if (is_object($value) && isset($value->$fieldName)) {
82 $discriminatorValue = $value->$fieldName;
83 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
84 return self::$discriminatorClasses[$discriminatorValue];
87 if (is_array($value) && isset($value[$fieldName])) {
89 $discriminatorValue = $value[$fieldName];
90 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
91 return self::$discriminatorClasses[$discriminatorValue];
96 $type = AttributeGroupUpdateActionModel::class;