File tree Expand file tree Collapse file tree 5 files changed +85
-1
lines changed
dev/tests/api-functional/testsuite/Magento/Catalog/Api Expand file tree Collapse file tree 5 files changed +85
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,33 @@ public function getIsVisibleInGrid();
139
139
*/
140
140
public function getIsFilterableInGrid ();
141
141
142
+ /**
143
+ * Set is attribute used in grid
144
+ *
145
+ * @param bool|null $isUsedInGrid
146
+ * @return $this
147
+ */
148
+ public function setIsUsedInGrid ($ isUsedInGrid );
149
+
150
+ /**
151
+ * Set is attribute visible in grid
152
+ *
153
+ * @return $this
154
+ */
155
+ /**
156
+ * @param bool|null $isVisibleInGrid
157
+ * @return $this
158
+ */
159
+ public function setIsVisibleInGrid ($ isVisibleInGrid );
160
+
161
+ /**
162
+ * Set is attribute filterable in grid
163
+ *
164
+ * @param bool|null $isFilterableInGrid
165
+ * @return $this
166
+ */
167
+ public function setIsFilterableInGrid ($ isFilterableInGrid );
168
+
142
169
/**
143
170
* Set whether it is used in search results layered navigation
144
171
*
Original file line number Diff line number Diff line change @@ -361,4 +361,31 @@ public function setScope($scope)
361
361
return $ this ;
362
362
}
363
363
}
364
+
365
+ /**
366
+ * @inheritdoc
367
+ */
368
+ public function setIsUsedInGrid ($ isUsedInGrid )
369
+ {
370
+ $ this ->setData (self ::IS_USED_IN_GRID , $ isUsedInGrid );
371
+ return $ this ;
372
+ }
373
+
374
+ /**
375
+ * @inheritdoc
376
+ */
377
+ public function setIsVisibleInGrid ($ isVisibleInGrid )
378
+ {
379
+ $ this ->setData (self ::IS_VISIBLE_IN_GRID , $ isVisibleInGrid );
380
+ return $ this ;
381
+ }
382
+
383
+ /**
384
+ * @inheritdoc
385
+ */
386
+ public function setIsFilterableInGrid ($ isFilterableInGrid )
387
+ {
388
+ $ this ->setData (self ::IS_FILTERABLE_IN_GRID , $ isFilterableInGrid );
389
+ return $ this ;
390
+ }
364
391
}
Original file line number Diff line number Diff line change @@ -848,4 +848,31 @@ public function __wakeup()
848
848
$ this ->_productFlatIndexerHelper = $ objectManager ->get (\Magento \Catalog \Helper \Product \Flat \Indexer::class);
849
849
$ this ->attrLockValidator = $ objectManager ->get (LockValidatorInterface::class);
850
850
}
851
+
852
+ /**
853
+ * @inheritdoc
854
+ */
855
+ public function setIsUsedInGrid ($ isUsedInGrid )
856
+ {
857
+ $ this ->setData (self ::IS_USED_IN_GRID , $ isUsedInGrid );
858
+ return $ this ;
859
+ }
860
+
861
+ /**
862
+ * @inheritdoc
863
+ */
864
+ public function setIsVisibleInGrid ($ isVisibleInGrid )
865
+ {
866
+ $ this ->setData (self ::IS_VISIBLE_IN_GRID , $ isVisibleInGrid );
867
+ return $ this ;
868
+ }
869
+
870
+ /**
871
+ * @inheritdoc
872
+ */
873
+ public function setIsFilterableInGrid ($ isFilterableInGrid )
874
+ {
875
+ $ this ->setData (self ::IS_FILTERABLE_IN_GRID , $ isFilterableInGrid );
876
+ return $ this ;
877
+ }
851
878
}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public function setFrontendInput($frontendInput);
94
94
/**
95
95
* Retrieve entity type id
96
96
*
97
- * @return string|null
97
+ * @return string
98
98
*/
99
99
public function getEntityTypeId ();
100
100
Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ public function testUpdate()
142
142
'attribute ' => [
143
143
'attribute_id ' => $ attribute ['attribute_id ' ],
144
144
'attribute_code ' => $ attributeCode ,
145
+ 'entity_type_id ' => 4 ,
146
+ 'is_used_in_grid ' => true ,
145
147
'default_frontend_label ' => 'default_label_new ' ,
146
148
'frontend_labels ' => [
147
149
['store_id ' => 1 , 'label ' => 'front_lbl_new ' ],
@@ -183,6 +185,7 @@ public function testUpdate()
183
185
$ result = $ this ->updateAttribute ($ attributeCode , $ attributeData );
184
186
185
187
$ this ->assertEquals ($ attribute ['attribute_id ' ], $ result ['attribute_id ' ]);
188
+ $ this ->assertEquals ($ attribute ['is_used_in_grid ' ], $ result ['is_used_in_grid ' ]);
186
189
$ this ->assertEquals ($ attributeCode , $ result ['attribute_code ' ]);
187
190
$ this ->assertEquals ('default_label_new ' , $ result ['default_frontend_label ' ]);
188
191
//New option set as default
You can’t perform that action at this time.
0 commit comments