Symfony\Component\Form\Form::setParent PHP Метод

setParent() публичный Метод

Sets the parent form.
public setParent ( Symfony\Component\Form\FormInterface $parent = null ) : Form
$parent Symfony\Component\Form\FormInterface The parent form
Результат Form The current form
    public function setParent(FormInterface $parent = null)
    {
        $this->parent = $parent;

        return $this;
    }

Usage Example

Пример #1
0
 /**
  * @param string $name
  * @param string $dataClass
  * @param array $options
  * @param FormInterface $parent
  * @return FormInterface
  */
 protected function createForm($name, $dataClass = null, array $options = array(), FormInterface $parent = null)
 {
     $eventDispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $config = new FormConfigBuilder($name, $dataClass, $eventDispatcher, $options);
     $result = new Form($config);
     $result->setParent($parent);
     return $result;
 }
All Usage Examples Of Symfony\Component\Form\Form::setParent