/**
  * @return FormTypeGuesserInterface
  */
 protected function getFormTypeGuesser()
 {
     if (!$this->formTypeGuesser) {
         $this->formTypeGuesser = $this->formRegistry->getTypeGuesser();
     }
     return $this->formTypeGuesser;
 }
Exemple #2
0
 public function testGetExtensions()
 {
     $expectedExtensions = array($this->extension1, $this->extension2);
     $this->assertEquals($expectedExtensions, $this->registry->getExtensions());
 }
 /**
  *
  * @param \Symfony\Component\Form\FormRegistry $formRegistry
  * @param \Doctrine\Common\Persistence\ManagerRegistry $managerRegistry
  */
 public function __construct(FormRegistry $formRegistry, ManagerRegistry $managerRegistry)
 {
     $this->typeGuesser = $formRegistry->getTypeGuesser();
     $this->managerRegistry = $managerRegistry;
 }