File tree 1 file changed +1
-16
lines changed
app/code/Magento/Cms/Model 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -154,25 +154,10 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria
154
154
155
155
$ this ->collectionProcessor ->process ($ criteria , $ collection );
156
156
157
- $ blocks = [];
158
- /** @var Block $blockModel */
159
- foreach ($ collection as $ blockModel ) {
160
- $ blockData = $ this ->dataBlockFactory ->create ();
161
- $ this ->dataObjectHelper ->populateWithArray (
162
- $ blockData ,
163
- $ blockModel ->getData (),
164
- \Magento \Cms \Api \Data \BlockInterface::class
165
- );
166
- $ blocks [] = $ this ->dataObjectProcessor ->buildOutputDataArray (
167
- $ blockData ,
168
- \Magento \Cms \Api \Data \BlockInterface::class
169
- );
170
- }
171
-
172
157
/** @var Data\BlockSearchResultsInterface $searchResults */
173
158
$ searchResults = $ this ->searchResultsFactory ->create ();
174
159
$ searchResults ->setSearchCriteria ($ criteria );
175
- $ searchResults ->setItems ($ blocks );
160
+ $ searchResults ->setItems ($ collection -> getItems () );
176
161
$ searchResults ->setTotalCount ($ collection ->getSize ());
177
162
return $ searchResults ;
178
163
}
You can’t perform that action at this time.
0 commit comments