code: public function getRepositoryForType($type)
      {
          $class = $this->getResourceTypeConfiguration($type)->getEntity();
  
          $entityManager = $this->doctrine->getManagerForClass($class);
          if (!$entityManager instanceof EntityManagerInterface) {
              throw new \InvalidArgumentException("No manager found for class {$class}");
          }
  
          return $entityManager->getRepository($class);
      }
docs: {@inheritdoc}
  
  @throws \InvalidArgumentException