File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
app/code/Magento/Ui/DataProvider Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,18 @@ public function setConfigData($config)
287
287
*/
288
288
public function getAllIds ()
289
289
{
290
- return $ this ->getSearchResult ()->getAllIds ();
290
+ $ idsArray = [];
291
+ $ searchResult = $ this ->getSearchResult ();
292
+ if ($ searchResult instanceof \Magento \Eav \Model \Entity \Collection \AbstractCollection
293
+ || $ searchResult instanceof \Magento \Framework \Model \ResourceModel \Db \Collection \AbstractCollection
294
+ ) {
295
+ $ idsArray = $ searchResult ->getAllIds ();
296
+ } else {
297
+ foreach ($ searchResult ->getItems () as $ item ) {
298
+ /** @var $item \Magento\Framework\Api\Search\DocumentInterface */
299
+ $ idsArray [] = $ item ->getId ();
300
+ }
301
+ }
302
+ return $ idsArray ;
291
303
}
292
304
}
You can’t perform that action at this time.
0 commit comments