src/Charcoal/Admin/Widget/FormWidget.php
public function addHiddenProperty($propertyIdent, $formProperty)
    {
        if (!is_string($propertyIdent)) {
            throw new InvalidArgumentException(
                'Property ident must be a string'
            );
        }

        if (is_array($formProperty)) {
            $this->getOrCreateFormProperty($propertyIdent, $formProperty);
        } elseif (!$formProperty instanceof FormPropertyWidget) {
            throw new InvalidArgumentException(sprintf(
                'Property must be an array or an instance of FormPropertyWidget, received %s',
                is_object($formProperty) ? get_class($formProperty) : gettype($formProperty)
            ));
        }

        return $this;
    }
public function addHiddenProperty($propertyIdent, $formProperty)
    {
        if (!is_string($propertyIdent)) {
            throw new InvalidArgumentException(
                'Property ident must be a string'
            );
        }

        if (is_array($formProperty)) {
            $this->getOrCreateFormProperty($propertyIdent, $formProperty);
        } elseif (!$formProperty instanceof FormPropertyWidget) {
            throw new InvalidArgumentException(sprintf(
                'Property must be an array or an instance of FormPropertyWidget, received %s',
                is_object($formProperty) ? get_class($formProperty) : gettype($formProperty)
            ));
        }

        return $this;
    }
public function addHiddenProperty ( $ propertyIdent , $ formProperty ) { if ( ! is_string ( $ propertyIdent ) ) { throw new InvalidArgumentException ( 'Property ident must be a string' ) ; } if ( is_array ( $ formProperty ) ) { $ this -> getOrCreateFormProperty ( $ propertyIdent , $ formProperty ) ; } elseif ( ! $ formProperty instanceof FormPropertyWidget ) { throw new InvalidArgumentException ( sprintf ( 'Property must be an array or an instance of FormPropertyWidget, received %s' , is_object ( $ formProperty ) ? get_class ( $ formProperty ) : gettype ( $ formProperty ) ) ) ; } return $ this ; }
Add a hidden property control to the form.

@param  string                      $propertyIdent The property identifier.
@param  array|FormPropertyInterface $formProperty  The property object or structure.
@throws InvalidArgumentException If the identifier or the property is invalid.
@return FormInterface Chainable
Add a hidden property control to the form .