@@ -46,7 +46,7 @@ public function __construct(
46
46
}
47
47
48
48
/**
49
- * { @inheritdoc}
49
+ * @inheritdoc
50
50
*/
51
51
public function getAttributes ($ formCode )
52
52
{
@@ -67,7 +67,7 @@ public function getAttributes($formCode)
67
67
}
68
68
69
69
/**
70
- * { @inheritdoc}
70
+ * @inheritdoc
71
71
*/
72
72
public function getAttributeMetadata ($ attributeCode )
73
73
{
@@ -92,7 +92,7 @@ public function getAttributeMetadata($attributeCode)
92
92
}
93
93
94
94
/**
95
- * { @inheritdoc}
95
+ * @inheritdoc
96
96
*/
97
97
public function getAllAttributesMetadata ()
98
98
{
@@ -116,7 +116,7 @@ public function getAllAttributesMetadata()
116
116
}
117
117
118
118
/**
119
- * { @inheritdoc}
119
+ * @inheritdoc
120
120
*/
121
121
public function getCustomAttributesMetadata ($ dataObjectClassName = self ::DATA_INTERFACE_NAME )
122
122
{
@@ -134,13 +134,27 @@ public function getCustomAttributesMetadata($dataObjectClassName = self::DATA_IN
134
134
$ isDataObjectMethod = isset ($ this ->customerDataObjectMethods ['get ' . $ camelCaseKey ])
135
135
|| isset ($ this ->customerDataObjectMethods ['is ' . $ camelCaseKey ]);
136
136
137
- /** Even though disable_auto_group_change is system attribute, it should be available to the clients */
138
137
if (!$ isDataObjectMethod
139
- && (!$ attributeMetadata ->isSystem () || $ attributeCode == 'disable_auto_group_change ' )
138
+ && (!$ attributeMetadata ->isSystem ()
139
+ || in_array ($ attributeCode , $ this ->getAllowedSystemAttributesList ())
140
+ )
140
141
) {
141
142
$ customAttributes [] = $ attributeMetadata ;
142
143
}
143
144
}
144
145
return $ customAttributes ;
145
146
}
147
+
148
+ /**
149
+ * Get list of system attributes which should be available to the clients
150
+ *
151
+ * @return array
152
+ */
153
+ private function getAllowedSystemAttributesList ()
154
+ {
155
+ return [
156
+ 'disable_auto_group_change ' ,
157
+ 'reward_update_notification '
158
+ ];
159
+ }
146
160
}
0 commit comments