Controller/Controller.php
public function getFormFor($entity, $className = null, array $options = array())
    {
        if (empty($this->_formHelper) && ($this->_formHelper = $this->get('orkestra.application.helper.form')) == null) {
            throw new \RuntimeException('Orkestra FormHelper is not registered as a service');
        }

        $type = $this->container->get('orkestra.application.helper.form')->getType($entity, $className);

        return $this->createForm($type, $entity, $options);
    }
public function getFormFor($entity, $className = null, array $options = array())
    {
        if (empty($this->_formHelper) && ($this->_formHelper = $this->get('orkestra.application.helper.form')) == null) {
            throw new \RuntimeException('Orkestra FormHelper is not registered as a service');
        }

        $type = $this->container->get('orkestra.application.helper.form')->getType($entity, $className);

        return $this->createForm($type, $entity, $options);
    }
Get Form Type

@param object      $entity
@param string|null $className If the object being passed is a subclass,
specify the superclass that should be used to find the form type.
@param array $options

@throws \RuntimeException
@return \Symfony\Component\Form\AbstractType