typeId = $typeId; $this->synchronizer = $synchronizer; $this->logger = $logger; $this->appConfig = $appConfig; } /** * Post Process collection data in order to eject all customer sensitive information * * {@inheritdoc} */ public function getSectionData() { if (!(bool) $this->appConfig->getValue(Synchronizer::ALLOW_SYNC_WITH_BACKEND_PATH)) { return [ 'count' => 0, 'items' => [], ]; } $actions = $this->synchronizer->getActionsByType($this->typeId); $items = []; /** @var ProductFrontendAction $action */ foreach ($actions as $action) { $items[$action->getProductId()] = [ 'added_at' => $action->getAddedAt(), 'product_id' => $action->getProductId(), ]; } return [ 'count' => count($items), 'items' => $items, ]; } }