Method to get the field options.

@return  array  The field option objects.
161366
protected function getOptions()
	{
		// Initialize some field attributes.
		$client = (string) $this->element['client'];
		if ($client != 'site' && $client != 'administrator')
		{
			$client = 'site';
		}

		$client_id = 0;

		if ($client == 'administrator')
		{
			$client_id = 1;
		}

		$path = PATH_APP . DS . 'bootstrap' . DS . $client;
		if (!is_dir($path))
		{
			$path = PATH_CORE . DS . 'bootstrap' . DS . $client;
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(
			parent::getOptions(),
			App::get('language')->getList($this->value, $path, true, true, $client_id)
		);

		return $options;
	}
241162
public function getFieldLIst()
    {
        if (!isset($this->model->field_list)) {

            return $this->model->getFieldList();
        }

        return $this->model->field_list;
    }
991251
protected function getOptions()
	{
		// Initialize variables.
		$options = array();

		if ($this->element['option_blank'])
		{
			$options[] = Dropdown::option('', App::get('language')->txt('- Select -'), 'value', 'text');
		}

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			$label = (isset($option[0]) ? $option[0] : $option['label']);

			// Create a new option object based on the <option /> element.
			$tmp = Dropdown::option((string) $option['value'],
				App::get('language')->alt(trim((string) $label), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text',
				((string) $option['disabled'] == 'true')
			);
			foreach ($option->attributes() as $index => $value)
			{
				$dataCheck = strtolower(substr($index, 0, 4));
				if ($dataCheck == 'data')
				{
					$tmp->$index = (string) $value;
				}
			}

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
1005277
private function getFieldTypeChoices()
    {
        $choices = [];
        foreach ($this->fieldTypeCollectionFactory->getConcreteFieldTypesIdentifiers() as $fieldTypeIdentifier) {
            $choices[$this->getFieldTypeLabel($fieldTypeIdentifier)] = $fieldTypeIdentifier;
        }

        ksort($choices, SORT_NATURAL);

        return $choices;
    }
1056909
protected function getOptionsFields()
    {
        $fields = array(
            'showOptions' => array(
                'type' => 'checkbox',
                'label' => $this->t('field_showOptions'),
                'description' => $this->t('desc_showOptions'),
                'options' => array(
                    'optionsShow' => $this->t('option_optionsShow'),
                ),
            ),
            'optionsAllOn1Line' => array(
                'type' => 'select',
                'label' => $this->t('field_optionsAllOn1Line'),
                'options' => array(
                    0 => $this->t('option_do_not_use'),
                    PHP_INT_MAX => $this->t('option_always'),
                ) + array_combine(range(1, 10), range(1, 10)),
            ),
            'optionsAllOnOwnLine' => array(
                'type' => 'select',
                'label' => $this->t('field_optionsAllOnOwnLine'),
                'options' => array(
                    PHP_INT_MAX => $this->t('option_do_not_use'),
                    1 => $this->t('option_always'),
                ) + array_combine(range(2, 10), range(2, 10)),
            ),
            'optionsMaxLength' => array(
                'type' => 'number',
                'label' => $this->t('field_optionsMaxLength'),
                'description' => $this->t('desc_optionsMaxLength'),
                'attributes' => array(
                    'min' => 1,
                ),
            ),
        );
        return $fields;
    }
788293
protected function get_options() {
        $options = parent::get_options();
        $options['groupid'] = $this->groupid;
        $options['courseid'] = $this->courseid;
        return $options;
    }
1132313
protected function getOptions()
	{
		$options = array();

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			// Create a new option object based on the <option /> element.
			$tmp = HtmlSelect::option(
				(string) $option['value'],
				Text::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text',
				((string) $option['disabled'] == 'true')
			);

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
209239
public function getOptions() {
		$reflection = new ReflectionObject($this);
		$methods    = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
		
		$options = [];
		
		foreach ($methods as $method) {
			if ($method->getNumberOfRequiredParameters() > 0) {
				continue;
			}
			
			$name = $method->name;
			
			if (isset($name[3]) && $name !== 'getOptions' && substr($name, 0, 3) === 'get') {
				$optionName = lcfirst(substr($name, 3));
				$options[$optionName] = $method->invoke($this);
			}
		}
		
		return $options;
	}
854957
protected function getOptions()
	{
		$options = array();

		$select = new HtmlSelect;

		// Try to inject the text object into the field
		try
		{
			$select->setText($this->getText());
		}
		catch (\RuntimeException $exception)
		{
			// A Text object was not set, ignore the error and try to continue processing
		}

		/** @var \SimpleXMLElement $option */
		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			// Create a new option object based on the <option /> element.
			$tmp = $select->option(
				(string) $option['value'], trim((string) $option), 'value', 'text', ((string) $option['disabled'] == 'true')
			);

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
1109950
public function getOptions()
    {
        $options = array();
        foreach ($this->commandOptions as $key => $value) {
            $options[$key]=$this->$value;
        }
        return $options;
    }
986675
protected function getOptions()
	{
		// Initialize variables.
		$options = array();

		// Initialize some field attributes.
		$key       = $this->element['key_field']   ? (string) $this->element['key_field']   : 'value';
		$value     = $this->element['value_field'] ? (string) $this->element['value_field'] : (string) $this->element['name'];
		$translate = $this->element['translate']   ? (string) $this->element['translate']   : false;
		$query     = (string) $this->element['query'];

		// Get the database object.
		$db = App::get('db');

		// Set the query and get the result list.
		$db->setQuery($query);
		$items = $db->loadObjectlist();

		// Check for an error.
		if ($db->getErrorNum())
		{
			return $options;
		}

		// Build the field options.
		if (!empty($items))
		{
			foreach ($items as $item)
			{
				if ($translate == true)
				{
					$options[] = Dropdown::option($item->$key, App::get('language')->txt($item->$value));
				}
				else
				{
					$options[] = Dropdown::option($item->$key, $item->$value);
				}
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}
673172
protected function getOptions()
    {
        if (!$this->options) {
            $this->options = $this->default;
        }

        $options = [];
        foreach ($this->options as $value => $active)  {
            $options[] = $this->getActiveString($active).$value;
        }

        return join(" ", $options);
    }
1053952
public function getOptionList()
    {
        return $list = $this->optionlist instanceOf Binding ? $this->optionlist->getValue() : $this->optionlist;
    }
1303243
protected function getOptions(): array
	{
		$options = [];

		foreach($this->options as $group)
		{
			foreach($group as $name => $option)
			{
				$options[] = ['--' . $name, $option['description']];
			}
		}

		sort($options);

		return $options;
	}
848222
protected function getOptions()
	{
		// Initialize variables.
		$options = array();

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			$label = (isset($option[0]) ? $option[0] : $option['label']);

			// Create a new option object based on the <option /> element.
			$tmp = Dropdown::option(
				(string) $option['value'], trim((string) $label), 'value', 'text',
				((string) $option['disabled'] == 'true')
			);
			foreach ($option->attributes() as $index => $value)
			{
				$dataCheck = strtolower(substr($index, 0, 4));
				if ($dataCheck == 'data')
				{
					$tmp->$index = (string) $value;
				}
			}

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
307175
public function toOptionArray()
    {
        $fields = $this->dataHelper->getOrderTableDescription();

        $customFields[] = [
            'label' => __('---- Default Option ----'),
            'value' => '0',
        ];
        foreach ($fields as $field) {
            $customFields[] = [
                'value' => $field['COLUMN_NAME'],
                'label' => $field['COLUMN_NAME'],
            ];
        }

        return $customFields;
    }
1242707
public function getOptions()
    {
        if ($this->connect) {
            if (! $this->options) {
                $this->options = collect();
            } else {
                $this->options = collect($this->options);
            }
            $model = new $this->connect->model;
            $get_options_query = $model;
            if (isset($this->connect->where_key) && $this->connect->where_key) {
                $get_options_query = $get_options_query->where($this->connect->where_key, '=', $this->connect->where_value);
            }

            if (isset($this->connect->group_by) && $this->connect->group_by) {
                $get_options_query = $get_options_query->whereNotNull($this->connect->group_by)->groupBy([$this->connect->group_by]);
            }

            if ($get_options = $get_options_query->get()) {
                foreach ($get_options as $get_options_value) {
                    if ($get_options_value !== null) {
                        if ($this->option_key) {
                            $this->options->put($get_options_value->{$this->option_key}, $get_options_value->{$this->option_title});
                        } else {
                            $this->options->push($get_options_value);
                        }
                    }
                }
            }

            if (!$this->option_key) {
                $this->options = $this->options->pluck($this->name);
            }
        } else {
            $this->options = collect($this->options);
        }

        return $this->options->unique();
    }