*/ class DestroyingCircle implements IEventListener { use TStringTools; use TNCLogger; /** @var ShareWrapperService */ private $shareWrapperService; /** * AddingMember constructor. * * @param ShareWrapperService $shareWrapperService */ public function __construct(ShareWrapperService $shareWrapperService) { $this->shareWrapperService = $shareWrapperService; $this->setup('app', Application::APP_ID); } /** * @throws RequestBuilderException */ public function handle(Event $event): void { if (!$event instanceof DestroyingCircleEvent) { return; } $circle = $event->getCircle(); $this->shareWrapperService->deleteAllSharesToCircle($circle->getSingleId()); } }