em = $entityManager; $this->productFamilyContainer = $productFamilyContainer; $this->productContainer = $productContainer; $this->orderShopBuilder = $orderShopBuilder; } public static function getSubscribedEvents() { return [ AfterEntityUpdatedEvent::class => ['processAfterFlushProductFamily'], ]; } public function processAfterFlushProductFamily(AfterEntityUpdatedEvent $event) { $entity = $event->getEntityInstance(); if ($entity instanceof ProductFamilyInterface) { $this->orderShopBuilder->updatePriceByProductFamily($entity); } } }