public function setOrigin(FormInterface $origin)
    {
        if (null !== $this->origin) {
            throw new BadMethodCallException('setOrigin() must only be called once.');
        }

        $this->origin = $origin;
    }
public function setOrigin(FormInterface $origin)
    {
        if (null !== $this->origin) {
            throw new BadMethodCallException('setOrigin() must only be called once.');
        }

        $this->origin = $origin;
    }
public function setOrigin ( FormInterface $ origin ) { if ( null !== $ this -> origin ) { throw new BadMethodCallException ( 'setOrigin() must only be called once.' ) ; } $ this -> origin = $ origin ; }
Sets the form that caused this error.

This method must only be called once.

@param FormInterface $origin The form that caused this error

@throws BadMethodCallException If the method is called more than once
Sets the form that caused this error .