Fields that have been added.

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
194218
public function generateAddedFields()
    {
        foreach ($this->keptModelKeys as $modelName) {
            $oldFieldKeys = $this->oldFieldKeys[$modelName];
            $newFieldKeys = $this->newFieldKeys[$modelName];

            $addedFields = array_diff($newFieldKeys, $oldFieldKeys);

            foreach ($addedFields as $addedField) {
                $this->findAddedFields($modelName, $addedField);
            }
        }
    }
833811
public function changedFieldNames()
    {
        $diffed = clone $this->fromRecord;
        $fields = array_keys($diffed->toMap());

        $changedFields = [];

        foreach ($fields as $field) {
            if (in_array($field, $this->ignoredFields)) {
                continue;
            }
            if ($this->fromRecord->$field != $this->toRecord->$field) {
                $changedFields[] = $field;
            }
        }

        return $changedFields;
    }
423798
public void addWrittenFields(FieldSet writtenFields) {
		if(this.writtenFields == null) {
			this.writtenFields = new FieldSet(writtenFields);
		} else {
			this.writtenFields.addAll(writtenFields);
		}
	}
526293
def add_fields(*fields)
            raise TypeError, "Expected Field arguments" unless fields.all? { |f| f.is_a?(Field) }

            self.Catalog.AcroForm ||= InteractiveForm.new.set_indirect(true)
            self.Catalog.AcroForm.Fields ||= []

            self.Catalog.AcroForm.Fields.concat(fields)
            fields.each do |field| field.set_indirect(true) end

            self
        end
1274554
private function processFieldDefinition()
    {
        if (isset($this->definition['field'])) {
            $this->fields = $this->definition['field'];
        } elseif (isset($this->definition['fields'])) {
            $this->fields = $this->definition['fields'];
        } else {
            $this->fields = '*';
        }
    }
364537
private function setCustomFields()
    {
        $customFieldCollection = new CustomFieldCollection();

        if (isset($this->simpleXml->{'custom-fields'})) {
            /** @var SimpleXMLElement $field */
            foreach ($this->simpleXml->{'custom-fields'}->children() as $field) {
                $customField = $this->convertToCustomField($field);
                if (!is_null($customField)) {
                    $customFieldCollection->add($customField);
                }
            }
        }
        $this->customFields = $customFieldCollection;
    }
1177453
protected function _addDefaultFields()
    {
        $select = $this->clause('select');
        $this->_hasFields = true;

        /** @var \Cake\ORM\Table $repository */
        $repository = $this->getRepository();

        if (!count($select) || $this->_autoFields === true) {
            $this->_hasFields = false;
            $this->select($repository->getSchema()->columns());
            $select = $this->clause('select');
        }

        $aliased = $this->aliasFields($select, $repository->getAlias());
        $this->select($aliased, true);
    }
263448
public function fields()
    {
        if(!isset($this->_fields))
            $this->_fields = new Fields($this->_result);

        return $this->_fields;
    }
903739
public function addFields(array $fields)
    {
        $fields = Helpers\Validate::arrToLower($fields);

        Helpers\Validate::types(array_values($fields));

        $schema = $this->schema();
        $fields = array_diff_assoc($fields, $schema);

        if (!empty($fields))
        {
            $config         = $this->config();
            $config->schema = array_merge($schema, $fields);

            $data = $this->getData();
            foreach ($data as $key => $object)
            {
                foreach ($fields as $name => $type)
                {
                    if (Helpers\Validate::isNumeric($type))
                        $data[$key]->{$name} = 0;
                    else
                        $data[$key]->{$name} = null;
                }
            }

            Helpers\Data::table($this->name)->put($data);
            Helpers\Config::table($this->name)->put($config);
        }
    }
326495
public function addColumnFields()
    {
        global $post;
        $screen = get_current_screen();

        if (empty($post->post_type) || $screen->base != 'post') {
            return;
        }

        $modules = array();

        // If manually picked
        if ($newModules = $this->checkIfManuallyPicked($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If post type
        if ($newModules = $this->checkIfPostType($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If child
        if ($newModules = $this->checkIfChild($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        if (empty($modules)) {
            return false;
        }

        $modules = array_filter($modules, function ($item) {
            return !wp_is_post_revision($item);
        });

        $fields = $this->getColumns($modules);

        if (!empty($fields)) {
            add_meta_box(
                'modularity-mod-posts-expandable-list',
                __('Modularity expandable list column values', 'modularity'),
                array($this, 'columnFieldsMetaBoxContent'),
                null,
                'normal',
                'default',
                array($fields)
            );
        }
    }
525960
public function addFields($fields)
    {
        foreach ($fields as $field) {
            if (is_array($field)) {
                $this->addField(...$field);
            } else {
                $this->addField($field);
            }
        }

        return $this;
    }
914078
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
580124
public function generateRenamedFields()
    {
        /* @var $oldModelState ModelState */
        /* @var $field Field */
        foreach ($this->keptModelKeys as $modelName) {
            $oldModelName = $this->getOldModelName($modelName);
            $meta = $this->newRegistry
                ->getModel($modelName)->getMeta();
            $oldModelState = $this->fromState->getModelState($oldModelName);

            $newModel = $this->newRegistry->getModel($modelName);

            $oldFieldKeys = $this->oldFieldKeys[$modelName];
            $newFieldKeys = $this->newFieldKeys[$modelName];

            $addedFields = array_diff($newFieldKeys, $oldFieldKeys);

            foreach ($addedFields as $addedField) {
                $field = $newModel->getMeta()->getField($addedField);
                $fieldDef = $this->deepDeconstruct($field);

                $removedFields = array_diff($oldFieldKeys, $newFieldKeys);
                foreach ($removedFields as $remField) {
                    $oldFieldDef = $this->deepDeconstruct(
                        $oldModelState->getFieldByName($remField)
                    );

                    if (!is_null($field->relation) &&
                        !is_null($field->relation->toModel) &&
                        isset($oldFieldDef['constructorArgs']['to'])
                    ) {
                        $oldRelTo = $oldFieldDef['constructorArgs']['to'];
                        if (in_array($oldRelTo, $this->renamedModels)) {
                            $oldFieldDef['constructorArgs']['to'] =
                                $this->getOldModelName($oldRelTo);
                        }
                    }

                    if ($fieldDef === $oldFieldDef) {
                        if (MigrationQuestion::hasFieldRenamed(
                            $this->asker,
                            $modelName,
                            $remField,
                            $addedField,
                            $field
                        )
                        ) {
                            $this->addOperation(
                                $meta->getAppName(),
                                RenameField::createObject(
                                    [
                                        'modelName' => $modelName,
                                        'oldName' => $remField,
                                        'newName' => $addedField,
                                    ]
                                )
                            );

                            // remove the old name and update with the new name.
                            $pos = array_search(
                                $remField,
                                $this->oldFieldKeys[$modelName]
                            );

                            array_splice(
                                $this->oldFieldKeys[$modelName],
                                $pos,
                                1,
                                [$addedField]
                            );
                            $this->renamedFields[$modelName][$addedField] = $remField;

                            break;
                        }
                    }
                }
            }
        }
    }
118972
private function AddEMailField()
    {
        $name = 'EMail';
        $this->AddField(Input::Text($name, $this->member->GetEMail()));
        $this->SetRequired($name);
        $this->AddValidator($name, PhpFilter::EMail());
        $this->AddValidator($name, DatabaseCount::UniqueField($this->member, $name));
    }
216730
public function addFields(array $fields)
    {
        foreach ($fields as $name => $attrs) {
            $this->addField($name, $attrs);
        }

        return $this;
    }
903758
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
    }
702097
public function index()
    {
        $this->loadModel('Field.FieldInstances');
        $instances = $this->_getInstances();
        if (count($instances) == 0) {
            $this->Flash->warning(__d('field', 'There are no field attached yet.'));
        }

        $this->title(__d('field', 'Fields List'));
        $this->set('instances', $instances);
    }