Get the requested fields for this resource type.

@return array|null
496491
protected function getOwnFields()
    {
        $type = $this->getType();

        if (isset($this->fields[$type])) {
            return $this->fields[$type];
        }
    }
878404
public function getProcessedFields()
    {
        return [
            'page'    => $this->getPage(),
            'perPage' => $this->getPerPage(),
            'filter'  => $this->filter,
            'orderBy' => $this->orderBy,
            'query'   => $this->searchQuery
        ];
    }
1164776
public function getFields() {
        if($this->cachedFields == null) {
            $this->cachedFields = $this->createFields();
        }

        return $this->cachedFields;
    }
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
            ]
        );
    }
724110
public function getFields()
    {
        return [(new IntegerField($this->getName()))->unsigned(true)->size($this->getSize())->required($this->isRequired())];
    }
461955
public function getFieldsConfig()
    {
        if (null === $this->fieldsConfigList) {
            $this->fieldsConfigList = [];

            foreach ($this->getFields() as $field) {
                $reflectionProperty = $this->getReflector()->getProperty($field);
                $docBlock = $reflectionProperty->getDocComment();
                preg_match('/@var\s([a-z]*).*/', $docBlock, $matches);

                $this->fieldsConfigList[$field] = [
                    'type' => isset($matches[1]) ? $matches[1] : null
                ];
            }

        }

        return $this->fieldsConfigList;
    }
801996
protected function getListField()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->field->getList($conditions);
    }
1303081
protected function getCandidateFields()
    {

        // Get list of all configured classes available for spam detection
        $types = $this->config()->get('check_fields');
        $typesInherit = array();
        foreach ($types as $type) {
            $subTypes = ClassInfo::subclassesFor($type);
            $typesInherit = array_merge($typesInherit, $subTypes);
        }

        // Get all candidates of the above types
        return $this
            ->Parent()
            ->Fields()
            ->filter('ClassName', $typesInherit)
            ->exclude('Title', ''); // Ignore this field and those without titles
    }
420593
protected function getParams()
    {
        $reserved = [
            $this->config('prefix', '').'sort',
            $this->config('prefix', '').'fields',
            $this->config('prefix', '').'limit',
            $this->config('prefix', '').'with',
            $this->config('prefix', '').'page',
        ];

        return $this->params ?: $this->request->except($reserved);
    }
892445
public function getQueryFields()
    {
        // Not necessary to specify this unless boosting
        if (empty($this->boostedFields)) {
            return null;
        }
        $queryFields = array();
        foreach ($this->boostedFields as $fieldName => $boost) {
            $queryFields[] = $fieldName . '^' . $boost;
        }

        // If any fields are queried, we must always include the default field, otherwise it will be excluded
        $df = $this->getDefaultField();
        if ($queryFields && !isset($this->boostedFields[$df])) {
            $queryFields[] = $df;
        }

        return $queryFields;
    }
8869
protected function getFields() {
        if (!$this->_fields) {
            $this->_fields = new FieldList(
                $this->version,
                $this->solution['assistantSid'],
                $this->solution['sid']
            );
        }

        return $this->_fields;
    }
809532
public function getFilteredFields()
    {
        $filteredFields = array();
        foreach ($this->_fields as $fieldName => $data) {
            $filteredFields[$fieldName] = $data['value'];
        }
        return $filteredFields;
    }
1343933
public function getFields()
    {
        $fields = $this->getInput('fields');

        if (! is_array($fields)) {
            return [];
        }

        return array_map(function ($fields) {
            return explode(',', $fields);
        }, $fields);
    }
1055462
public function getFieldTypeService()
    {
        if (null === $this->fieldTypeService) {
            $this->fieldTypeService = new FieldTypeService($this->fieldTypes);
        }

        return $this->fieldTypeService;
    }
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;
    }
966993
public function buildFieldsTypes() {
        $this->getAbstractClass()->addUse('Bullhorn\FastRest\Api\Models\ApiInterface');

        $content = 'return [';
        foreach($this->getFields() as $key => $field) {
            if($key > 0) {
                $content .= ',';
            }

            $constantName = 'FIELD_TYPE_' . strtoupper(preg_replace('@([A-Z])@', '_\\0', lcfirst($field->getType())));
            $content .= "\n\t\t\t" . '\'' . $field->getShortName() . '\'=>ApiInterface::' . $constantName;
        }
        $content .= "\n\t\t" . '];';

        $method = new Object\Method();
        $method->setAccess('public');
        $method->setName('getFieldTypes');
        $method->setReturnType('string[]');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);

        return $content;
    }
873581
public function fields()
    {
        $fields = $this->get('form/fields');

        if ($fields === null) {
            $field = $this->get('form/field');
            $fields = $field !== null ? ['' => (array) $field] : $fields;
        }

        return (array) $fields;
    }