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

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

Removes a child from the form.
public remove ( string $name ) : Form
$name string The name of the child to remove
Результат Form the current form
    public function remove($name)
    {
        if (isset($this->children[$name])) {
            $this->children[$name]->setParent(null);

            unset($this->children[$name]);
        }

        return $this;
    }

Usage Example

 function it_does_not_remove_user_form_type_if_users_data_is_submitted(FormEvent $event, Form $form)
 {
     $event->getData()->willReturn(['user' => ['plainPassword' => 'test']]);
     $event->getForm()->shouldNotBeCalled();
     $form->remove('user')->shouldNotBeCalled();
     $this->preSubmit($event);
 }
All Usage Examples Of Symfony\Component\Form\Form::remove