Retrieve the list of accepted field names by the specified <strategy>.

@param $strategy
@param array $options
@return mixed
777153
public function getCredentialFields($strategy, array $options = [])
    {
        $options['httpParams'][':strategy'] = $strategy;

        return $this->kuzzle->query($this->buildQueryArgs('getCredentialFields'), [], $options)['result'];
    }
9023
protected function getValidationSchemasName($scenario)
    {
        $on     = 'on' . ucfirst($scenario);
        $extend = 'extend' . ucfirst($scenario);

        return [$on, $extend];
    }
364166
public function defaultSortingStrategy(string $strategy): ModelList
    {
        if (is_string($this->main['default_sort'])) {
            $this->main['default_sort'] = [ $this->main['default_sort'] ];
            $this->main['default_sort'][] = $strategy;

            return $this;
        }

        $this->main['default_sort'] = $strategy;

        return $this;
    }
103617
public function getIdFromOptions(array $options) : string
    {
        $optionsResolver = new OptionsResolver();
        $optionsResolver->setRequired('id');

        $options = $optionsResolver->resolve($options);

        return $options['id'];
    }
1316353
public function input($fieldName, array $options = [])
    {
        if ($fieldName instanceof \Field\Model\Entity\Field) {
            if (!$this->_isRendering) {
                $this->_isRendering = true;
                $result = $fieldName->edit($this->_View);
                $this->_isRendering = false;

                return $result;
            } else {
                $options += ['value' => $fieldName->value, 'label' => $fieldName->label];
                if ($fieldName->metadata->required) {
                    $options['label'] .= ' *';
                    $options['required'] = 'required';
                }
                $fieldName = $fieldName->get('name');
            }
        }

        return parent::input($fieldName, $options);
    }
533226
protected function getExportDownloadFilename($strategy, $extension)
    {
        return Carbon::now()->format('Y-m-d_H-i')
             . ' - ' . $this->getModelSlug()
             . '.' . ltrim($extension, '.');
    }
116855
public function updateMyCredentials($strategy, $credentials, array $options = [])
    {
        $options['httpParams'][':strategy'] = $strategy;

        return $this->query($this->buildQueryArgs('auth', 'updateMyCredentials'), ['body' => $credentials], $options)['result'];
    }
380699
protected function resolveStrategyClass($strategy)
    {
        if ( ! str_contains($strategy, '.')) {
            $strategy = config('cms-models.strategies.list.sort-aliases.' . $strategy, $strategy);
        }

        if (class_exists($strategy) && is_a($strategy, SortStrategyInterface::class, true)) {
            return $strategy;
        }

        $strategy = $this->prefixStrategyNamespace($strategy);

        if (class_exists($strategy) && is_a($strategy, SortStrategyInterface::class, true)) {
            return $strategy;
        }

        return false;
    }
171736
protected function getTagName($options) {
    if ($options['tag']) {
      $tag_name = $options['tag'];
    }
    else {
      $tag_name = $this->ask('Enter the tag name for the deployment artifact, e.g., 1.0.0-build');
    }

    if (empty($tag_name)) {
      // @todo Validate tag name is valid, e.g., no spaces or special characters.
      throw new BltException("You must enter a valid tag name.");
    }
    else {
      $this->say("Tag is set to <comment>$tag_name</comment>.");
    }

    return $tag_name;
  }
93376
public function export($strategy)
    {
        // Check if the strategy is available and allowed to be used
        if ( ! $this->isExportStrategyAvailable($strategy)) {
            abort(403, "Not possible or allowed to perform export '{$strategy}'");
        }

        // Prepare the strategy instance
        $exporter = $this->getExportStrategyInstance($strategy);
        $filename = $this->getExportDownloadFilename($strategy, $exporter->extension());

        $this->checkListParents()
             ->checkActiveSort(false)
             ->checkScope(false)
             ->checkFilters()
             ->checkActivePage(false)
             ->applySort()
             ->applyScope($this->modelRepository);

        $query = $this->getModelRepository()->query();

        $this->applyFilter($query)
             ->applyListParentToQuery($query);

        $download = $exporter->download($query, $filename);

        if (false === $download) {
            // @codeCoverageIgnoreStart
            abort(500, "Failed to export model listing for strategy '{$strategy}'");
            // @codeCoverageIgnoreEnd
        }

        event( new Events\ModelListExportedInCms($this->modelInformation->modelClass(), $strategy) );

        return $download;
    }
1368133
public function orHavingConditions($strategy)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->orHavingConditions($strategy);

        return $instance;
    }
1182839
protected function getFieldOptions($name, array $options = [])
    {
        $fieldOptions = Arr::get($options, 'field', []);

        if ($this->isFieldDisabled($options)) {
            $fieldOptions['disabled'] = 'disabled';
        }

        $fieldOptions['id'] = $this->getFieldId($name, $options);

        return $fieldOptions;
    }
1063344
protected function parseField($fields, $options = [])
    {
        $fieldsStr = '';
        if ('*' == $fields || empty($fields)) {
            $fieldsStr = '*';
        } elseif (is_array($fields)) {
            // 支持 'field1'=>'field2' 这样的字段别名定义
            $array = [];
            foreach ($fields as $key => $field) {
                if (!is_numeric($key)) {
                    $array[] = $this->parseKey($key, $options) . ' AS ' . $this->parseKey($field, $options);
                } else {
                    $array[] = $this->parseKey($field, $options);
                }
            }
            $fieldsStr = implode(',', $array);
        }
        return $fieldsStr;
    }
385795
public function getIdNameMap( $options = [] ) {

		$map = parent::getIdNameMap( $options );

		if( isset( $options[ 'default' ] ) && $options[ 'default' ] ) {

			unset( $options[ 'default' ] );

			$map = ArrayHelper::merge( [ '0' => 'Choose Theme' ], $map );
		}

		return $map;
	}
1130887
private function getFieldAttributes(array $options)
    {
        $fieldAttributes = ['class' => 'form-control'];

        if (isset($options['class'])) {
            $fieldAttributes['class'] .= ' '.$options['class'];
        }

        if (isset($options['id'])) {
            $fieldAttributes += ['id' => $options['id']];
        }
        if (isset($options['readonly']) && $options['readonly'] == true) {
            $fieldAttributes += ['readonly'];
        }
        if (isset($options['disabled']) && $options['disabled'] == true) {
            $fieldAttributes += ['disabled'];
        }
        if (isset($options['required']) && $options['required'] == true) {
            $fieldAttributes += ['required'];
        }
        if (isset($options['min'])) {
            $fieldAttributes += ['min' => $options['min']];
        }
        if (isset($options['max'])) {
            $fieldAttributes += ['max' => $options['max']];
        }
        if (isset($options['step'])) {
            $fieldAttributes += ['step' => $options['step']];
        }
        if (isset($options['style'])) {
            $fieldAttributes += ['style' => $options['style']];
        }

        return $fieldAttributes;
    }
14838
public function get($strategy = null)
    {
        if(!$strategy) {
            return $this->defaultStrategy;
        }

        $strategy = $this->getOrNull($strategy);

        if(!$strategy) {
            throw new UnknownStrategyException;
        }

        return $strategy;
    }
1108492
public function orWhereConditions($strategy)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereConditions($strategy);

        return $instance;
    }