cmsPageFactory = $cmsPageFactory; $this->itemFactory = $itemFactory; $this->configReader = $configReader; } /** * {@inheritdoc} */ public function getItems($storeId) { $collection = $this->cmsPageFactory->create()->getCollection($storeId); $items = array_map(function ($item) use ($storeId) { return $this->itemFactory->create([ 'url' => $item->getUrl(), 'updatedAt' => $item->getUpdatedAt(), 'images' => $item->getImages(), 'priority' => $this->configReader->getPriority($storeId), 'changeFrequency' => $this->configReader->getChangeFrequency($storeId), ]); }, $collection); return $items; } }