Return an array of the fields to delete (compared to origFields).

@return array
189569
protected function getFieldsToDelete()
    {
        $toDelete = array();

        $fields     = $this->_item->getFields();
        $origFields = $this->_item->getOrigFields();
        foreach ($origFields as $field => $value) {
            if (! array_key_exists($field, $fields)) {
                $toDelete[$field] = Update::DELETE_VALUE;
            }
        }

        return $toDelete;
    }
310001
public function getFields()
    {
        $query_fields = $this->query['fields'] ?? '';
        if ($query_fields === '') {
            return [];
        }

        $special = $this->getSpecialFields();
        foreach ($special as $key => $value) {
            $special[$key] = implode(',', $value);
        }

        $fields = array_filter(explode(',', str_replace(
            array_keys($special),
            $special,
            $query_fields
        )));

        $message = $this->hasFields($fields);
        if ($message !== true) {
            return $message;
        }
        return $fields;
    }
1067928
public function getChangedFields() {
        if($this->isAfterSave() && method_exists($this->getEntity(), 'getUpdatedFields')) {
            if($this->getEntity()->hasSnapshotData()) {
                $actualChangedFields = $this->getEntity()->getUpdatedFields();
            } else {
                $actualChangedFields = $this->getSnapshotData();
            }
        } else { //Legacy
            $actualChangedFields = $this->getEntity()->getChangedFields();
        }
        $model = $this->getEntity();
        foreach($actualChangedFields as $index => $changedField) {
            $newValue = $model->readAttribute($changedField);
            if(is_array($newValue)) {
                $newValue = json_encode($newValue);
            }
            $oldValue = $this->getSnapshotData()[$changedField] ?? null ?? null;
            if(is_object($oldValue)) {
                $oldValue = (string)$oldValue;
            }
            if(is_object($newValue)) {
                $newValue = (string)$newValue;
            }
            if(is_bool($oldValue) || is_bool($newValue)){
                $oldValue = (bool) $oldValue;
                $newValue = (bool) $newValue;
            }
            if($oldValue === $newValue) {
                unset($actualChangedFields[$index]);
            }

        }
        return array_values($actualChangedFields);
    }
296739
public function getRemovedLines()
    {
        return array_values(array_filter(
            $this->lines,
            function (Line $line) {
                return $line->getType() == Line::REMOVED;
            }
        ));
    }
562947
public function generateRemovedFields()
    {
        foreach ($this->keptModelKeys as $modelName) {
            $oldFieldKeys = $this->oldFieldKeys[$modelName];
            $newFieldKeys = $this->newFieldKeys[$modelName];

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

            foreach ($remFields as $remField) {
                $this->findRemovedFields($modelName, $remField);
            }
        }
    }
82176
public function getFieldNames()
    {
        $names = array();

        foreach ($this->getFields() as $field) {
            $names[] = $field->name;
        }

        return $names;
    }
493095
public function getSolrFields()
    {
        $solr = $this->def->getSolr();
        if (!$solr instanceof Solr) {
            return [];
        }

        $fields = [];
        foreach ($solr->getFields() as $field) {
            $fields[] = [
                'name' => $field->getName(),
                'type' => $field->getType(),
                'weight' => $field->getWeight()
            ];
        }

        return $fields;
    }
674456
protected function getFields(): array
    {
        $fields = $this->getConfig('fields');
        $defaults = [
            'decrypt' => false,
        ];
        $result = [];
        foreach ($fields as $field => $values) {
            if (is_numeric($field)) {
                $field = $values;
                $values = [];
            }
            $values = array_merge($defaults, $values);
            $result[$field] = $values;
        }

        return $result;
    }
997097
public function fields(): array
    {
        $fields[] = Select::make('user.roles.')
            ->fromModel(Role::class, 'name')
            ->multiple()
            ->horizontal()
            ->title(__('Name role'));

        $permissionFields = $this->generatedPermissionFields($this->query->getContent('permission'));

        return array_merge($fields, $permissionFields);
    }
772120
public function getFieldNames()
    {
        $names = [];

        for ($i = 0; $i < $this->countFields(); $i++) {
            $names[] = $this->getFieldName($i);
        }

        return $names;
    }
29093
public function getProcessedFields()
    {
        $fields = array();
        foreach ($this->fields as $fieldName => $field) {
            $fields[$fieldName] = $this->getProcessedField($fieldName);
        }

        return $fields;
    }
710162
public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
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;
    }
169451
public function toArray()
    {
        $fieldValues = [];
        foreach ($this->fields as $group) {
            foreach ($group as $name => $field) {
                $fieldValues[$name] = $field->getValue();
            }
        }
        return $fieldValues;
    }
492884
private function getFields()
    {
        $fields = [];

        foreach ($this->items as $name => $field) {
            if (is_array($field) && isset($field['name'])) {
                $fields[] = $field['name'];
            } else if ($field instanceof FillableField){
                $fields[] = $field->name;
            } else if (is_string($name)){
                $fields[] = $name;
            } else {
                $fields[] = '';
            }
        }

        return $fields;
    }
496491
protected function getOwnFields()
    {
        $type = $this->getType();

        if (isset($this->fields[$type])) {
            return $this->fields[$type];
        }
    }
692185
public function getFormFields(): array
    {
        $properties = $this->getProperties();

        $fields = array_diff($properties, ['id']);

        $fieldsWithTypes = [];
        foreach ($fields as $field) {
            $fieldsWithTypes[$field] = null;
        }

        return $fieldsWithTypes;
    }