protected function getFormObjectArgument()
    {
        $objectArgument = $this->arguments['object'];

        if (null === $objectArgument) {
            return null;
        }

        if (false === is_object($objectArgument)) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueType($objectArgument);
        }

        if (false === $objectArgument instanceof FormInterface) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueObjectType($objectArgument);
        }

        $formClassName = $this->getFormClassName();

        if (false === $objectArgument instanceof $formClassName) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueClassName($formClassName, $objectArgument);
        }

        return $objectArgument;
    }
protected function getFormObjectArgument()
    {
        $objectArgument = $this->arguments['object'];

        if (null === $objectArgument) {
            return null;
        }

        if (false === is_object($objectArgument)) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueType($objectArgument);
        }

        if (false === $objectArgument instanceof FormInterface) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueObjectType($objectArgument);
        }

        $formClassName = $this->getFormClassName();

        if (false === $objectArgument instanceof $formClassName) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueClassName($formClassName, $objectArgument);
        }

        return $objectArgument;
    }
protected function getFormObjectArgument ( ) { $ objectArgument = $ this -> arguments [ 'object' ] ; if ( null === $ objectArgument ) { return null ; } if ( false === is_object ( $ objectArgument ) ) { throw InvalidOptionValueException :: formViewHelperWrongFormValueType ( $ objectArgument ) ; } if ( false === $ objectArgument instanceof FormInterface ) { throw InvalidOptionValueException :: formViewHelperWrongFormValueObjectType ( $ objectArgument ) ; } $ formClassName = $ this -> getFormClassName ( ) ; if ( false === $ objectArgument instanceof $ formClassName ) { throw InvalidOptionValueException :: formViewHelperWrongFormValueClassName ( $ formClassName , $ objectArgument ) ; } return $ objectArgument ; }
Checks the type of the argument `object`, and returns it if everything is
ok.

@return FormInterface|null
@throws InvalidOptionValueException
Checks the type of the argument object and returns it if everything is ok .