From b9f4b725dc5a9d96ae66e588b54e44a0c4ca40a5 Mon Sep 17 00:00:00 2001 From: ciastektk Date: Fri, 18 Feb 2022 12:37:31 +0100 Subject: [PATCH] IBX-2367: Dropped sendDeliveryFeedback from RecommendationController (#107) https://issues.ibexa.co/browse/IBX-2367 --- .../Controller/RecommendationController.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/bundle/Controller/RecommendationController.php b/src/bundle/Controller/RecommendationController.php index 5cc4db1a..3fca5e6a 100644 --- a/src/bundle/Controller/RecommendationController.php +++ b/src/bundle/Controller/RecommendationController.php @@ -10,8 +10,6 @@ use EzSystems\EzRecommendationClient\Config\CredentialsResolverInterface; use EzSystems\EzRecommendationClient\Event\RecommendationResponseEvent; -use EzSystems\EzRecommendationClient\Request\BasicRecommendationRequest; -use EzSystems\EzRecommendationClient\Service\RecommendationServiceInterface; use Ramsey\Uuid\Uuid; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; @@ -25,26 +23,18 @@ class RecommendationController /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ private $eventDispatcher; - /** @var \EzSystems\EzRecommendationClient\Service\RecommendationServiceInterface */ - private $recommendationService; - /** @var \EzSystems\EzRecommendationClient\Config\CredentialsResolverInterface */ private $credentialsResolver; /** @var \Twig\Environment */ private $twig; - /** @var bool */ - private $sendDeliveryFeedback = true; - public function __construct( EventDispatcherInterface $eventDispatcher, - RecommendationServiceInterface $recommendationService, CredentialsResolverInterface $credentialsResolver, Environment $twig ) { $this->eventDispatcher = $eventDispatcher; - $this->recommendationService = $recommendationService; $this->credentialsResolver = $credentialsResolver; $this->twig = $twig; } @@ -70,10 +60,6 @@ public function showRecommendationsAction(Request $request): Response $response = new Response(); $response->setPrivate(); - if ($this->sendDeliveryFeedback) { - $this->recommendationService->sendDeliveryFeedback($request->get(BasicRecommendationRequest::OUTPUT_TYPE_ID_KEY)); - } - return $response->setContent( $this->twig()->render($template, [ 'recommendations' => $event->getRecommendationItems(), @@ -82,11 +68,6 @@ public function showRecommendationsAction(Request $request): Response ); } - public function sendDeliveryFeedback(bool $value): void - { - $this->sendDeliveryFeedback = $value; - } - protected function twig(): Environment { return $this->twig;