public function __construct(ObjectManager $om, $entityClass, FormFactoryInterface $formFactory) { $this->om = $om; $this->entityClass = $entityClass; $this->repository = $this->om->getRepository($this->entityClass); $this->formFactory = $formFactory; }