Provides a quick way to define additional methods to provideGraphQLScaffolding as Fields
@return Array
513116
public function gqlFields()
    {
        $fields = $this->config()->get('gql_fields');
        $this->extend('updateGqlFields', $fields);
        $fields = array_merge(['LinkURL'], $fields);
        return $fields;
    }
285329
public function getFields()
    {
        if (null == $this->fields) {
            $properties = $this->inspector->getClassProperties();
            $this->fields = new FieldsCollection();
            foreach ($properties as $property) {
                $this->addDescriptor($property);
            }
        }
        return $this->fields;
    }
778052
public function getElasticaFields() {
		$db = \DataObject::database_fields(get_class($this->owner));
		$fields = $this->owner->searchableFields();
		$result = new \ArrayObject();

		foreach ($fields as $name => $params) {
			$type = null;
			$spec = array();

			if (array_key_exists($name, $db)) {
				$class = $db[$name];

				if (($pos = strpos($class, '('))) {
					$class = substr($class, 0, $pos);
				}

				if (array_key_exists($class, self::$mappings)) {
					$spec['type'] = self::$mappings[$class];
				}
			}

			$result[$name] = $spec;
		}
        
        $result['LastEdited'] = array('type' => 'date');
        $result['Created'] = array('type' => 'date');
        $result['ID']       = array('type' => 'integer');

        $result['ParentID'] = array('type' => 'integer');
        $result['Sort'] = array('type' => 'integer');
        
        $result['Name'] = array('type' => 'string');
        $result['MenuTitle'] = array('type' => 'string');
        $result['ShowInSearch'] = array('type' => 'integer');
        
        $result['ClassName'] = array('type' => 'string');
        $result['ClassNameHierarchy'] = array('type' => 'string');

        $result['SS_Stage'] = array('type' => 'keyword');

        $result['PublicView'] = array('type' => 'boolean');

        if ($this->owner->hasExtension('Hierarchy') || $this->owner->hasField('ParentID')) {
            $result['ParentsHierarchy'] = array('type' => 'long',);
        }

        // fix up dates
        foreach ($result as $field => $spec) {
            if (isset($spec['type']) && ($spec['type'] == 'date')) {
                $spec['format'] = 'yyyy-MM-dd HH:mm:ss';
                $result[$field] = $spec;
            }
        }

        if (isset($result['Content']) && count($result['Content'])) {
            $spec = $result['Content'];
            $spec['store'] = false;
            $result['Content'] = $spec;
        }
        $this->owner->invokeWithExtensions('updateElasticMappings', $result);
        
		return $result->getArrayCopy();
	}
198182
public function toArray()
    {
        $relations = [];
        $arrayableRelations = [];

        // include any relations exposed by default
       foreach ($this->exposedRelations as $relation) {
            // skip loading a relation if it is from a method
            if (in_array($relation, $this->relationsFromMethod)) {
                // if the relation hasnt been loaded, then load it
                if (!isset($this->$relation)) {
                    $this->$relation = $this->$relation();
                }

                $arrayableRelations[$relation] = $this->$relation;
                continue;
            }

            $this->load($relation);
        }

        // fetch the relations that can be represented as an array
        $arrayableRelations = array_merge($this->getArrayableRelations(), $arrayableRelations);

        // add the relations to the linked array
        foreach ($arrayableRelations as $relation => $value) {
            if (in_array($relation, $this->hidden)) {
                continue;
            }

            if ($value instanceof Pivot) {
                continue;
            }

            if ($value instanceof BaseModel) {
                $relations[$relation] = array('linkage' => array('id' => (string)$value->getKey(), 'type' => $value->getResourceType()));
            } elseif ($value instanceof Collection) {
                $relation = \str_plural($relation);
                $items = ['linkage' => []];
                foreach ($value as $item) {
                    $items['linkage'][] = array('id' => (string)$item->getKey(), 'type' => $item->getResourceType());
                }
                $relations[$relation] = $items;
            }

            // remove models / collections that we loaded from a method
            if (in_array($relation, $this->relationsFromMethod)) {
                unset($this->$relation);
            }
        }

        //add type parameter
        $model_attributes = $this->attributesToArray();
        unset($model_attributes[$this->primaryKey]);

        $attributes = [
            'id'         => (string)$this->getKey(),
            'type'       => $this->getResourceType(),
            'attributes' => $model_attributes
        ];

        if (! count($relations)) {
            return $attributes;
        }

        return array_merge(
            $attributes,
            [ 'links' => $relations ]
        );
    }
23888
protected function fieldfillers() {

		$fieldrender = $this->fieldrender();

		if ($this->hintrenderer !== null) {
			$callable = &$this->hintrenderer;
			$hintsrender = $callable($this->hints());
		}
		else { # no hint renderer
			$hintsrender = null;
		}

		if ($this->showerrors && $this->errorrenderer) {
			$callable = &$this->errorrenderer;
			$errorrrender = $callable($this->errors());
		}
		else { # no error renderer
			$errorrrender = null;
		}

		return array
			(
				':id'     => $this->get('id', null),
				':field'  => $fieldrender,
				':label'  => $this->fieldlabel(),
				':hints'  => $hintsrender,
				':errors' => $errorrrender,
			);
	}
878404
public function getProcessedFields()
    {
        return [
            'page'    => $this->getPage(),
            'perPage' => $this->getPerPage(),
            'filter'  => $this->filter,
            'orderBy' => $this->orderBy,
            'query'   => $this->searchQuery
        ];
    }
1139916
public function getFieldsUsed(): array
    {
        $fields = [];

        /** @var Field $node */
        foreach ($this->getNodesOfType(Field::NODE_TYPE) as $node) {
            $fields[$node->getName()] = true;
        }

        return array_keys($fields);
    }
51595
public static function get_field_data() {
		return array(
			'glue'              => array(
				'type'    => 'text',
				'title'   => __( 'Glue', 'carbon_breadcrumbs' ),
				'default' => ' > ',
				'help'    => __( 'This is displayed between the breadcrumb items.', 'carbon_breadcrumbs' ),
			),
			'link_before'       => array(
				'type'    => 'text',
				'title'   => __( 'Link Before', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed before the breadcrumb item link.', 'carbon_breadcrumbs' ),
			),
			'link_after'        => array(
				'type'    => 'text',
				'title'   => __( 'Link After', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed after the breadcrumb item link.', 'carbon_breadcrumbs' ),
			),
			'wrapper_before'    => array(
				'type'    => 'text',
				'title'   => __( 'Wrapper Before', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed before displaying the breadcrumb items.', 'carbon_breadcrumbs' ),
			),
			'wrapper_after'     => array(
				'type'    => 'text',
				'title'   => __( 'Wrapper After', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed after displaying the breadcrumb items.', 'carbon_breadcrumbs' ),
			),
			'title_before'      => array(
				'type'    => 'text',
				'title'   => __( 'Title Before', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed before the breadcrumb item title.', 'carbon_breadcrumbs' ),
			),
			'title_after'       => array(
				'type'    => 'text',
				'title'   => __( 'Title After', 'carbon_breadcrumbs' ),
				'default' => '',
				'help'    => __( 'This is displayed after the breadcrumb item title.', 'carbon_breadcrumbs' ),
			),
			'min_items'         => array(
				'type'    => 'text',
				'title'   => __( 'Min Items', 'carbon_breadcrumbs' ),
				'default' => 2,
				'help'    => __( 'Determines the minimum number of items, required to display the breadcrumb trail.', 'carbon_breadcrumbs' ),
			),
			'last_item_link'    => array(
				'type'    => 'checkbox',
				'title'   => __( 'Last Item Link', 'carbon_breadcrumbs' ),
				'default' => true,
				'help'    => __( 'Whether the last breadcrumb item should be a link.', 'carbon_breadcrumbs' ),
			),
			'display_home_item' => array(
				'type'    => 'checkbox',
				'title'   => __( 'Display Home Item?', 'carbon_breadcrumbs' ),
				'default' => true,
				'help'    => __( 'Whether the home breadcrumb item should be displayed.', 'carbon_breadcrumbs' ),
			),
			'home_item_title'   => array(
				'type'    => 'text',
				'title'   => __( 'Home Item Title', 'carbon_breadcrumbs' ),
				'default' => __( 'Home', 'carbon_breadcrumbs' ),
				'help'    => __( 'Determines the title of the home item.', 'carbon_breadcrumbs' ),
			),
		);
	}
369196
public function getFieldList()
    {
        $fields = new FieldList();

        // tabbed or untabbed
        if ($this->tabbed) {
            $fields->push(new TabSet("Root", $mainTab = new Tab("Main")));
            $mainTab->setTitle(_t(__CLASS__ . '.TABMAIN', 'Main'));
        }

        // Add logical fields directly specified in db config
        foreach ($this->obj->config()->get('db') as $fieldName => $fieldType) {
            // Skip restricted fields
            if ($this->restrictFields && !in_array($fieldName, $this->restrictFields)) {
                continue;
            }

            // @todo Pass localized title
            if ($this->fieldClasses && isset($this->fieldClasses[$fieldName])) {
                $fieldClass = $this->fieldClasses[$fieldName];
                $fieldObject = new $fieldClass($fieldName);
            } else {
                $fieldObject = $this
                    ->obj
                    ->dbObject($fieldName)
                    ->scaffoldFormField(null, $this->getParamsArray());
            }
            // Allow fields to opt-out of scaffolding
            if (!$fieldObject) {
                continue;
            }
            $fieldObject->setTitle($this->obj->fieldLabel($fieldName));
            if ($this->tabbed) {
                $fields->addFieldToTab("Root.Main", $fieldObject);
            } else {
                $fields->push($fieldObject);
            }
        }

        // add has_one relation fields
        if ($this->obj->hasOne()) {
            foreach ($this->obj->hasOne() as $relationship => $component) {
                if ($this->restrictFields && !in_array($relationship, $this->restrictFields)) {
                    continue;
                }
                $fieldName = $component === 'SilverStripe\\ORM\\DataObject'
                    ? $relationship // Polymorphic has_one field is composite, so don't refer to ID subfield
                    : "{$relationship}ID";
                if ($this->fieldClasses && isset($this->fieldClasses[$fieldName])) {
                    $fieldClass = $this->fieldClasses[$fieldName];
                    $hasOneField = new $fieldClass($fieldName);
                } else {
                    $hasOneField = $this->obj->dbObject($fieldName)->scaffoldFormField(null, $this->getParamsArray());
                }
                if (empty($hasOneField)) {
                    continue; // Allow fields to opt out of scaffolding
                }
                $hasOneField->setTitle($this->obj->fieldLabel($relationship));
                if ($this->tabbed) {
                    $fields->addFieldToTab("Root.Main", $hasOneField);
                } else {
                    $fields->push($hasOneField);
                }
            }
        }

        // only add relational fields if an ID is present
        if ($this->obj->ID) {
            // add has_many relation fields
            if ($this->obj->hasMany()
                && ($this->includeRelations === true || isset($this->includeRelations['has_many']))
            ) {
                foreach ($this->obj->hasMany() as $relationship => $component) {
                    if ($this->tabbed) {
                        $fields->findOrMakeTab(
                            "Root.$relationship",
                            $this->obj->fieldLabel($relationship)
                        );
                    }
                    $fieldClass = (isset($this->fieldClasses[$relationship]))
                        ? $this->fieldClasses[$relationship]
                        : 'SilverStripe\\Forms\\GridField\\GridField';
                    /** @var GridField $grid */
                    $grid = Injector::inst()->create(
                        $fieldClass,
                        $relationship,
                        $this->obj->fieldLabel($relationship),
                        $this->obj->$relationship(),
                        GridFieldConfig_RelationEditor::create()
                    );
                    if ($this->tabbed) {
                        $fields->addFieldToTab("Root.$relationship", $grid);
                    } else {
                        $fields->push($grid);
                    }
                }
            }

            if ($this->obj->manyMany()
                && ($this->includeRelations === true || isset($this->includeRelations['many_many']))
            ) {
                foreach ($this->obj->manyMany() as $relationship => $component) {
                    static::addManyManyRelationshipFields(
                        $fields,
                        $relationship,
                        (isset($this->fieldClasses[$relationship]))
                            ? $this->fieldClasses[$relationship] : null,
                        $this->tabbed,
                        $this->obj
                    );
                }
            }
        }

        return $fields;
    }
121401
public function getCMSFields()
    {
        $fields = $this->scaffoldFormFields(
            array(
                // Don't allow has_many/many_many relationship editing before the record is first saved
                'includeRelations' => ($this->ID > 0),
                'tabbed' => true,
                'ajaxSafe' => true
            )
        );
        $fields->removeByName('HasMain');
        $fields->addFieldsToTab(
            'Root.Main',
            array(
                TextField::create(
                    'Title',
                    _t('PlaceablePageType.TITLE', 'Title')
                )->setMaxLength(17),
                TextField::create(
                    'Description',
                    _t('PlaceablePageType.DESCRIPTION', 'Description')
                ),
                UploadField::create(
                    'Icon',
                    _t('PlaceablePageType.ICON', 'Icon')
                )
            )
        );

        $fields->addFieldToTab(
            'Root.Pages',
            GridField::create(
                'Pages',
                _t('PlaceablePageType.PAGES', 'Pages'),
                $this->Pages()
            )
        );

        $fields->addFieldToTab(
            'Root.Regions',
            GridField::create(
                'Regions',
                _t('PlaceablePageType.SECTIONS', 'Regions'),
                $this->Regions(),
                GridFieldConfig_MultiClass::create(
                    $this->Regions(),
                    singleton('RegionObject_Preset')->SubClassNames
                )
            )
        );
        return $fields;
    }
99522
protected function _getCsvFieldsEncolser()
    {
        if ($this->_sStringEncloser === null) {
            $this->_sStringEncloser = $this->_sDefaultStringEncloser;
            if ($char = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sGiCsvFieldEncloser')) {
                $this->_sStringEncloser = $char;
            }
        }

        return $this->_sStringEncloser;
    }
235987
protected function _fields()
    {
        $schema = $this->_table->getSchema();
        $fields = $schema->columns();
        if ($this->_config['fields'] !== null) {
            $fields = array_intersect($fields, (array)$this->_config['fields']);
        }

        return $fields;
    }
902901
public function getFields()
    {
        $fields = array();
        if (isset($this->definition['index'])) {
            $fields[] = $this->getIndex();
        }
        if (isset($this->definition['fields'])) {
            foreach ($this->definition['fields'] as $key => $value) {
                if (!is_numeric($key)) {
                    $fields[] = $key;
                } else {
                    $fields[] = $value;
                }
            }
        }
        return $fields;
    }
394860
protected function getTableFields() {
        $data = array_keys($this->rules());
        if (!empty($this->primaryKey)) {
            $data[] = $this->primaryKey;
        }
        return $data;
    }
386897
public function fieldNames()
    {
        if ($this->hasProperty()) {
            $property = $this->property();
            if ($property instanceof StorablePropertyInterface) {
                return $property->fieldNames();
            } else {
                return [ $property ];
            }
        }

        return [];
    }
481506
public function list_fields()
	{
		$field_names = array();
		foreach (sqlsrv_field_metadata($this->result_id) as $offset => $field)
		{
			$field_names[] = $field['Name'];
		}

		return $field_names;
	}
990236
protected function getFormFields()
    {
        $manyFields = $this->getManyFields();
        $formFields = [];
        foreach ($this->definition->getEditableFieldNames() as $field) {
            if (!in_array($field, $manyFields)) {
                $formFields[] = $field;
            }
        }
        return $formFields;
    }