Gets the final fields.

@return array
195566
protected function getFields()
    {
        if (is_null($this->fields)) {
            $columns = $this->getColumns();

            if (empty($columns)) {
                throw new Exception('The table ' . $this->tableName . ' was not found in the ' . $this->databaseName . ' database.');
            }

            $this->fields = $this->transfer($columns);
        }

        return $this->fields;
    }
912535
public function getFields()
    {
        if ($this->existing()) {
            return TableDumper::make($this->getEntities())->toSchema();
        }

        return $this->console->option('fields');
    }
508079
public function getFields()
    {
        $results = [];
        if (!isset($this->data['fields'])
            || empty($this->data['fields'])
        ) {
            return $results;
        }

        $table = $this->data['name'];
        foreach ($this->data['fields'] as $field) {
            $name = $table . '_' . $field['name'];
            $results[$name] = $field;
        }

        return $results;
    }
724110
public function getFields()
    {
        return [(new IntegerField($this->getName()))->unsigned(true)->size($this->getSize())->required($this->isRequired())];
    }
29093
public function getProcessedFields()
    {
        $fields = array();
        foreach ($this->fields as $fieldName => $field) {
            $fields[$fieldName] = $this->getProcessedField($fieldName);
        }

        return $fields;
    }
406640
public function getFields(): array
    {
        $fields = $this->reflection->getSchema();

        foreach ($fields as $field => $type) {
            if ($this->isAggregation($type)) {
                unset($fields[$field]);
            }
        }

        return $fields;
    }
880169
public function list_fields()
	{
		$field_names = array();
		mysql_field_seek($this->result_id, 0);
		while ($field = mysql_fetch_field($this->result_id))
		{
			$field_names[] = $field->name;
		}

		return $field_names;
	}
510652
protected function getFields(): ?array
    {
        $fields = $this->requestStack->getCurrentRequest()->get('fields');

        if (!is_null($fields)) {
            $fields = array_map('trim', explode(',', $fields));
        }

        return $fields;
    }
189410
protected function getFormFields()
    {
        $fields = FieldList::create();

        $controller = $this->getController();
        $backURL = $controller->getBackURL()
            ?: $controller->getReturnReferer();

        // Protect against infinite redirection back to the logout URL after logging out
        if (!$backURL || Director::makeRelative($backURL) === $controller->getRequest()->getURL()) {
            $backURL = Director::baseURL();
        }

        $fields->push(HiddenField::create('BackURL', 'BackURL', $backURL));

        return $fields;
    }
1085613
public function getFields()
    {
        $fields = FieldList::create();

        foreach ($this->fieldgroups as $group) {
            if (method_exists($this, 'get'.$group.'Fields')) {
                $fields->merge($this->{'get'.$group.'Fields'}());
            }
        }

        return $fields;
    }
82176
public function getFieldNames()
    {
        $names = array();

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

        return $names;
    }
1109277
public function getFields() {
        $connection = Pool::get(Connection::class);
        try {
            $fields = $connection->getFields($this->getTable());
            Pool::release($connection);
            return $fields;
        } catch (\RuntimeException $e) {
            Pool::release($connection);
            throw $e;
        } catch (\Error $e) {
            Pool::release($connection);
            throw $e;
        }

    }
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();
	}
1164776
public function getFields() {
        if($this->cachedFields == null) {
            $this->cachedFields = $this->createFields();
        }

        return $this->cachedFields;
    }
805440
public function getFields()
    {
        $hierarchy = [];
        foreach ($this->def->getTarget()->getFields() as $field) {
            $hierarchy = array_merge_recursive(
                $hierarchy,
                $this->createFieldHierarchyRecursive($field, $field->getName())
            );
        }

        $fields = [];

        /*******
         * CONDITIONAL GENERATED FIELD AREA
         *
         * so simplify things, you can put fields here that should be conditionally created by Graviton.
         * @TODO refactor into a FieldBuilder* type of thing where different builders can add fields conditionally.
         */

        // Versioning field, for version control.
        if ($this->def->getService() && $this->def->getService()->getVersioning()) {
            $definition = new Schema\Field();
            $constraint = new Constraint();
            $constraint->setName('versioning');
            $definition->setName(VersionServiceConstraint::FIELD_NAME)->setTitle('Version')->setType('int')
                       ->setConstraints([$constraint])
                       ->setDescription('Document version. You need to send current version if you want to update.');
            $fields['version'] = $this->processSimpleField('version',  $definition);
        }

        /*******
         * add fields as defined in the definition file.
         */

        foreach ($hierarchy as $name => $definition) {
            $fields[$name] = $this->processFieldHierarchyRecursive($name, $definition);
        }

        return $fields;
    }
178204
protected static function getAllFields()
    {
        return FieldsValues::construct(
            [
                self::FIELD_UNIQUE_ID,
                self::FIELD_USERNAME,
                self::FIELD_FIRST_NAME,
                self::FIELD_LAST_NAME,
                self::FIELD_FULL_NAME,
                self::FIELD_EMAIL,
                self::FIELD_DESCRIPTION,
                self::FIELD_LOCATION,
                self::FIELD_PROFILE_URL,
                self::FIELD_IMAGE_URL,
                self::FIELD_WEBSITES,
                self::FIELD_VERIFIED_EMAIL,
                self::FIELD_EXTRA
            ]
        );
    }
980875
public function getStoreFields()
    {
        $schemaManager = $this->connection->getDriver()->getSchemaManager($this->connection);
        $columns       = array();
        $sql           = $schemaManager->getDatabasePlatform()->getListTableColumnsSQL($this->tableName, $this->connection->getDatabase());
        $all           = $this->connection->fetchAll($sql);

        foreach ($all as $fieldInfo) {
            $columns[] = $fieldInfo["name"];
        }
        return $columns;
    }