Replace a field with a single field or array of fields
@param  string $name  name of field to replace
@param  NamedBuilder|NamedBuilder[] $field single or array of fields
@throws FieldNotFoundException if the field name doesn't exist
@return void
4590
public function replaceField($name, $field)
    {
        $index = $this->getFieldIndex($name);
        $this->removeFieldAtIndex($index);
        $this->insertFields($field, $index);
    }
1352956
public function removeField($name)
    {
        foreach ($this->fields as $tab => $fields) {
            foreach ($fields as $fieldName => $field) {
                if ($fieldName == $name) {
                    unset($this->fields[$tab][$fieldName]);

                    /*
                     * Remove empty tabs from collection
                     */
                    if (!count($this->fields[$tab])) {
                        unset($this->fields[$tab]);
                    }

                    return true;
                }
            }
        }

        return false;
    }
720223
public function remove_field($name){
		$ind = $this->is_field($name);
		if ($ind==-1) throw new Exception('There was no such data field registered as: '.$name);
		array_splice($this->text,$ind,1);
		//we not deleting field from $data collection, so it will not be included in data operation, but its data still available
	}
555453
public function changeField($name, array $attributes)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->changeFields[$name] = $attributes;
        return $this;
    }
800332
public function alterField($name, Field $field, Key $key = null)
    {
        if (null !== $key) {
            $field->setKey($key);
        }

        $this->fields[$name] = $field;

        $this->alters[$name] = $field;

        return $this;
    }
27983
public function showFile($field = null, $name = null)
    {
        $file = $this->getFilePath($field, $name);
        if (!file_exists($file) || !is_file($file)) {
            throw new NotFoundHttpException;
        }
        header('Content-Type: '. FileHelper::getMimeType($file), true);
        header('Content-Length: ' . filesize($file));
        readfile($file);
    }
116280
public function setFieldError($field, $name)
    {
        if (!$this->app->compat_42) {
            throw $this->exception('4.3', '_Obsolete');
        }
        $this->errors[$field] = (isset($this->errors[$field]) ? $this->errors[$field] : '').$name;
    }
411857
public function addUniqueKey($name, array $fields)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->uniqueKeys[$name] = $fields;
        return $this;
    }
1359580
public function build($name, Collection $fields = null)
    {
        $path = $this->getClassFilePath($name);
        $tableName = source_table_name($name);

        $contents = view('_hierarchy::entities.model', [
            'tableName'        => $tableName,
            'name'             => $this->getClassName($name),
            'fields'           => $this->makeFields($fields),
            'searchableFields' => $this->makeSearchableFields($fields, $tableName),
            'mutatables'       => $this->makeMutatableFields($fields)
        ])->render();

        $this->write($path, $contents);
    }
742061
public function add($name, $field = null, $fieldset = null, $group = null)
    {
        if ($name instanceof AbstractField) {
            $field = $name;
        } else {
            if (is_string($field) && class_exists($field)) {
                $field = new $field();
            }

            if (!$field instanceof AbstractField) {
                throw new \InvalidArgumentException(__METHOD__ . ' argument 2 should be sub class of AbstractField.');
            }

            $field->setName($name);
        }

        return $this->addField($field, $fieldset, $group);
    }
1213691
public function field($name)
    {
        if (in_array($name, Config::table($this->name)->fields()))
        {
            return true;
        }
        throw new dbException('Field ' . $name . ' does not exists in table "' . $this->name . '"');
    }
723155
public function addField(Field $field)
    {
        if (array_search($field, $this->fields) === false)
            $this->fields[] = $field;
    }
941043
function Field($name)
    {
        if (!array_key_exists($name, $this->fields))
            throw new \InvalidArgumentException($name . ' is not a valid field for '. $this->name);
        
        return $this->fields[$name];
    }
722706
public function addFieldType($name, Field\FieldInterface $field)
    {
        $this->setHandler($name, $field);
        $this->customHandlers[] = $name;
        $this->boltConfig->getFields()->addField($field);
    }
908830
public function getField($name)
    {
        return (null !== $name && array_key_exists($name, $this->fields)) ? $this->fields[$name] : null;
    }
816395
public function addField(Field $field)
    {
        $name = $field->getName();
        if (array_key_exists($name, $this->fields)) {
            throw new DuplicateFieldNameException($name);
        }
        $this->fields[$name] = $field;
        foreach ($field->getAliases() as $alias) {
            if (array_key_exists($alias, $this->fieldAliases)) {
                throw new DuplicateFieldAliasException($alias);
            }
            $this->fieldAliases[$alias] = $name;
        }

        return $this;
    }
266009
public function unhideField($field_name)
    {
        if (($key = array_search($field_name, $this->hiddenFields)) !== false) {
            unset($this->hiddenFields[$key]);
        }
    }