src/Zicht/Bundle/AdminBundle/Util/AdminUtil.php
public function add($name, $type = null, array $options = array(), array $fieldDescriptionOptions = array())
    {
        if (null === $this->formMapper) {
            throw new LogicException('No FormMapper to add fields to, please make sure you start with AdminUtil->map');
        }
        $this->formMapper->add($name, $type, $options, $fieldDescriptionOptions);
        if ($this->addHelp) {
            $this->formMapper->setHelps([$name => 'help' . (null !== $this->helpPrefix ? sprintf('.%s', $this->helpPrefix) : '') . '.' . $name]);
        }
        return $this;
    }
public function add($name, $type = null, array $options = array(), array $fieldDescriptionOptions = array())
    {
        if (null === $this->formMapper) {
            throw new LogicException('No FormMapper to add fields to, please make sure you start with AdminUtil->map');
        }
        $this->formMapper->add($name, $type, $options, $fieldDescriptionOptions);
        if ($this->addHelp) {
            $this->formMapper->setHelps([$name => 'help' . (null !== $this->helpPrefix ? sprintf('.%s', $this->helpPrefix) : '') . '.' . $name]);
        }
        return $this;
    }
public function add ( $ name , $ type = null , array $ options = array ( ) , array $ fieldDescriptionOptions = array ( ) ) { if ( null === $ this -> formMapper ) { throw new LogicException ( 'No FormMapper to add fields to, please make sure you start with AdminUtil->map' ) ; } $ this -> formMapper -> add ( $ name , $ type , $ options , $ fieldDescriptionOptions ) ; if ( $ this -> addHelp ) { $ this -> formMapper -> setHelps ( [ $ name => 'help' . ( null !== $ this -> helpPrefix ? sprintf ( '.%s' , $ this -> helpPrefix ) : '' ) . '.' . $ name ] ) ; } return $ this ; }
Add a field to the given formMapper

@param string $name
@param null $type
@param array $options
@param array $fieldDescriptionOptions
@return $this
Add a field to the given formMapper