public function postRemove(LifecycleEventArgs $args) { $entity = $args->getEntity(); if ($entity instanceof MenuItem) { $this->cleanCache(); } }