public function addCustomField($name, $class)
    {
        if (!array_key_exists($name, $this->customTypes)) {
            return $this->customTypes[$name] = $class;
        }

        throw new \InvalidArgumentException('Custom field ['.$name.'] already exists on this form object.');
    }
public function addCustomField($name, $class)
    {
        if (!array_key_exists($name, $this->customTypes)) {
            return $this->customTypes[$name] = $class;
        }

        throw new \InvalidArgumentException('Custom field ['.$name.'] already exists on this form object.');
    }
public function addCustomField ( $ name , $ class ) { if ( ! array_key_exists ( $ name , $ this -> customTypes ) ) { return $ this -> customTypes [ $ name ] = $ class ; } throw new \ InvalidArgumentException ( 'Custom field [' . $ name . '] already exists on this form object.' ) ; }
Add custom field

@param $name
@param $class
Add custom field