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 @@ -157,25 +157,10 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria
157
157
158
158
$ this ->collectionProcessor ->process ($ criteria , $ collection );
159
159
160
- $ pages = [];
161
- /** @var Page $pageModel */
162
- foreach ($ collection as $ pageModel ) {
163
- $ pageData = $ this ->dataPageFactory ->create ();
164
- $ this ->dataObjectHelper ->populateWithArray (
165
- $ pageData ,
166
- $ pageModel ->getData (),
167
- \Magento \Cms \Api \Data \PageInterface::class
168
- );
169
- $ pages [] = $ this ->dataObjectProcessor ->buildOutputDataArray (
170
- $ pageData ,
171
- \Magento \Cms \Api \Data \PageInterface::class
172
- );
173
- }
174
-
175
160
/** @var Data\PageSearchResultsInterface $searchResults */
176
161
$ searchResults = $ this ->searchResultsFactory ->create ();
177
162
$ searchResults ->setSearchCriteria ($ criteria );
178
- $ searchResults ->setItems ($ pages );
163
+ $ searchResults ->setItems ($ collection -> getItems () );
179
164
$ searchResults ->setTotalCount ($ collection ->getSize ());
180
165
return $ searchResults ;
181
166
}
You can’t perform that action at this time.
0 commit comments