File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
app/code/Magento/Cms/Model Expand file tree Collapse file tree 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
154154
155155 $ this ->collectionProcessor ->process ($ criteria , $ collection );
156156
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-
172157 /** @var Data\BlockSearchResultsInterface $searchResults */
173158 $ searchResults = $ this ->searchResultsFactory ->create ();
174159 $ searchResults ->setSearchCriteria ($ criteria );
175- $ searchResults ->setItems ($ blocks );
160+ $ searchResults ->setItems ($ collection -> getItems () );
176161 $ searchResults ->setTotalCount ($ collection ->getSize ());
177162 return $ searchResults ;
178163 }
You can’t perform that action at this time.
0 commit comments