Skip to content

Commit d6df47f

Browse files
committed
MAGETWO-66402: Backward Incompatible Change
- fix integration test
1 parent 43a7fbf commit d6df47f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/code/Magento/Ui/DataProvider/AbstractDataProvider.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,18 @@ public function setConfigData($config)
287287
*/
288288
public function getAllIds()
289289
{
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;
291303
}
292304
}

0 commit comments

Comments
 (0)