Gets the list of options to render in this formfield

@return ArrayList
8968
public function getOptions()
    {
        // Loop through and figure out which values were selected.
        $options = array();
        $selectedValue = $this->getValueArray();
        foreach ($this->getSource() as $itemValue => $title) {
            $itemSelected = in_array($itemValue, $selectedValue)
                || in_array($itemValue, $this->getDefaultItems());
            $itemDisabled = $this->isDisabled()
                || in_array($itemValue, $this->getDisabledItems());
            $options[] = new ArrayData(array(
                'Title' => $title,
                'Value' => $itemValue,
                'Selected' => $itemSelected,
                'Disabled' => $itemDisabled,
            ));
        }

        $options = new ArrayList($options);
        $this->extend('updateGetOptions', $options);
        return $options;
    }
1204986
protected function getFormConfiguration()
    {
        $formConfigurationArray = $this->getFormObject()->getConfiguration()->toArray();
        $this->removeFieldsValidationConfiguration($formConfigurationArray)
            ->addClassNameProperty($formConfigurationArray);

        return ArrayService::get()->arrayToJavaScriptJson($formConfigurationArray);
    }
707427
public function options(): array
    {
        return [
            TextArea::make('description')
                ->max(255)
                ->rows(5)
                ->required()
                ->title('Short description'),

            DateTimer::make('open')
                ->title('Opening date')
                ->help('The opening event will take place'),
        ];
    }
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;
	}
37919
public function getTemplates()
    {
        $template = parent::getTemplates();

        if ($default = $this->defaultTemplate) {
            $key = array_search('FormField', $template);

            if ($key !== false) {
                $default[$key] = $this->defaultTemplate;
            }
        }

        return $template;
    }
1325417
protected function _getListOptionsForElem() {
		$cachePath = 'DefaultOptions_Filter_' . $this->_currUIlang;
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		$inputSize = '';
		$btnSize = '';
		$formInputSize = $this->_getFormInputSize();
		if (!empty($formInputSize)) {
			$inputSize = ' input-' . $formInputSize;
			$btnSize = ' btn-' . $formInputSize;
		}
		$emptyText = $this->ViewExtension->showEmpty('');

		$result = [];
		$result['openFilterForm'] = [
			'role' => 'form',
			'class' => 'filter-form clone-wrapper',
			'autocomplete' => 'off',
			'data-max-clone' => CAKE_THEME_FILTER_ROW_LIMIT
		];
		$result['paginTableRowHeaderActTitle'] = __d('view_extension', 'Actions');
		$result['createFilterTableRow'] = [
			'commonOptions' => [
				'label' => false,
				'required' => false,
				'secure' => false,
				'class' => 'form-control' . $inputSize
			],
			'filterText' => __d(
				'view_extension',
				'Data filter for the table: %s',
				$this->Html->tag(
					'code',
					$emptyText,
					[
						'data-toggle' => 'filter-conditions',
						'data-empty-text' => $emptyText
					]
				)
			),
			'showFilterBtn' => $this->ViewExtension->button(
				'far fa-caret-square-down',
				'btn-default',
				['class' => 'show-filter-btn',
					'title' => __d('view_extension', 'Show or hide filter'),
					'data-toggle' => 'collapse', 'data-target' => '.filter-collapse',
					'aria-expanded' => 'false',
					'data-toggle-icons' => 'fa-caret-square-down,fa-caret-square-up'
				]
			),
			'applyFilterBtn' => $this->ViewExtension->button(
				'fas fa-filter',
				'btn-info',
				[
					'type' => 'submit',
					'class' => 'exclude-clone filter-apply',
					'title' => __d('view_extension', 'Apply filter'),
					'data-toggle' => 'tooltip',
					'value' => 'filter-apply',
					'name' => 'data[FilterAction]'
				]
			),
			'clearFilterBtn' => $this->ViewExtension->button(
				'fas fa-eraser',
				'btn-warning',
				[
					'type' => 'reset',
					'class' => 'exclude-clone filter-clear',
					'title' => __d(
						'view_extension',
						'Clear filter'
					),
					'data-toggle' => 'tooltip'
				]
			),
			'addRowBtn' => $this->ViewExtension->button(
				'fas fa-plus',
				'btn-success',
				[
					'title' => __d('view_extension', 'Add row of filter'),
					'data-toggle' => 'btn-action-clone'
				]
			),
			'deleteRowBtn' => $this->ViewExtension->button(
				'fas fa-trash-alt',
				'btn-danger',
				[
					'title' => __d('view_extension', 'Delete row of filter'),
					'data-toggle' => 'btn-action-delete'
				]
			),
			'printBtnOptions' => [
				'title' => __d('view_extension', 'Print informations'),
				'data-toggle' => 'tooltip',
				'target' => '_blank'
			],
			'exportBtnOptions' => [
				'title' => __d('view_extension', 'Export informations'),
				'data-toggle' => 'tooltip'
			],
			'tableHeaderOptions' => [
				'data-toggle' => 'clone-source',
				'class' => 'filter-collapse collapse filter-controls-row'
			]
		];
		$result['createGroupActionControls'] = [
			'selectAllBtn' => $this->ViewExtension->button(
				'far fa-check-square',
				'btn-info',
				['escape' => false, 'class' => 'hidden-print',
					'title' => __d('view_extension', 'Select / deselect all'),
					'data-toggle' => 'btn-action-select-all',
					'data-toggle-icons' => 'fa-check-square,fa-square']
			),
			'groupDataProcTitle' => $this->Html->tag('strong', __d('view_extension', 'Group data processing')),
			'performActionBtn' => [
				'type' => 'submit',
				'escape' => false,
				'title' => __d('view_extension', 'Perform action'),
				'data-toggle' => 'tooltip', 'value' => 'group-action',
				'name' => 'data[FilterAction]', 'data-dialog-title' => __d('view_extension', 'Action to perform'),
				'data-dialog-sel-placeholder' => __d('view_extension', 'Select a action'),
				'data-dialog-btn-ok' => __d('view_extension', 'Perform'),
				'data-dialog-btn-cancel' => __d('view_extension', 'Cancel')
			],
		];
		$result['getBtnConditionField'] = [
			'options' => [
				'' => ['name' => '=', 'title' => '=',
					'data-subtext' => __d('view_extension', 'Equal'), 'value' => ''],
				'gt' => ['name' => '&gt;', 'title' => '&gt;',
					'data-subtext' => __d('view_extension', 'Greater than'), 'value' => 'gt'],
				'ge' => ['name' => '&ge;', 'title' => '&ge;',
					'data-subtext' => __d('view_extension', 'Greater than or equal to'), 'value' => 'ge'],
				'lt' => ['name' => '&lt;', 'title' => '&lt;',
					'data-subtext' => __d('view_extension', 'Less than'), 'value' => 'lt'],
				'le' => ['name' => '&le;', 'title' => '&le;',
					'data-subtext' => __d('view_extension', 'Less than or equal to'), 'value' => 'le'],
				'ne' => ['name' => '&ne;', 'title' => '&ne;',
					'data-subtext' => __d('view_extension', 'Not equal'), 'value' => 'ne'],
			],
			'title' => __d('view_extension', 'Change the logical condition of the field')
		];
		$result['getBtnConditionGroup'] = [
			'options' => [
				'' => ['name' => '&nbsp;&&', 'title' => '&nbsp;&&', 'data-subtext' => __d('view_extension', 'And'), 'value' => ''],
				'or' => ['name' => '&nbsp;||', 'title' => '&nbsp;||', 'data-subtext' => __d('view_extension', 'Or'), 'value' => 'or'],
				'not' => ['name' => '&nbsp;!', 'title' => '&nbsp;!', 'data-subtext' => __d('view_extension', 'Not'), 'value' => 'not'],
			],
			'title' => __d('view_extension', 'Change the logical condition of the group')
		];
		$result['getBtnCondition'] = [
			'type' => 'select',
			'title' => __d('view_extension', 'Changing the filter condition'),
			'style' => 'btn-default btn-filter-condition' . $btnSize,
			'width' => 'fit',
			'live-search' => false,
			'class' => 'form-control show-tick filter-condition' . $inputSize,
			'autocomplete' => 'off',
			'div' => false,
			'label' => false,
			'escape' => false,
			'required' => false,
			'secure' => false,
		];
		$result['prepareOptions'] = [
			'select' => [
				'empty' => '--' . __d('view_extension', 'Sel.') . '--',
				'style' => 'btn-default' . $btnSize
			],
			'string' => [
				'div' => false,
				'type' => 'autocomplete',
				'url' => $this->url(
					$this->ViewExtension->addUserPrefixUrl([
						'controller' => 'filter',
						'action' => 'autocomplete',
						'plugin' => 'cake_theme',
						'ext' => 'json',
						'prefix' => false
					])
				)
			],
			'integer' => [
				'div' => 'input-group'
			],
			'boolean' => [
				'options' => $this->ViewExtension->yesNoList(),
				'type' => 'select',
				'style' => 'btn-default' . $btnSize,
				'empty' => '--' . __d('view_extension', 'Sel.') . '--'
			],
			'date' => [
				'div' => 'input-group',
				'widget-position-vertical' => 'bottom',
				'icon-type' => 'false',
			],
			'binary' => [
				'disabled' => true
			]
		];
		Cache::write($cachePath, $result, CAKE_THEME_CACHE_KEY_HELPERS);

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

		// Initialize some field attributes.
		$filter = (string) $this->element['filter'];
		$exclude = (string) $this->element['exclude'];
		$hideNone = (string) $this->element['hide_none'];
		$hideDefault = (string) $this->element['hide_default'];

		// Get the path in which to search for file options.
		$path = (string) $this->element['directory'];
		if (!is_dir($path))
		{
			$path = PATH_ROOT . '/' . $path;
		}

		// Prepend some default options based on field attributes.
		if (!$hideNone)
		{
			$options[] = Dropdown::option( '-1', App::get('language')->alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
		}
		if (!$hideDefault)
		{
			$options[] = Dropdown::option('', App::get('language')->alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
		}

		// Get a list of folders in the search path with the given filter.
		$folders = App::get('filesystem')->directories($path, $filter);

		// Build the options list from the list of folders.
		if (is_array($folders))
		{
			foreach ($folders as $folder)
			{

				// Check to see if the file is in the exclude mask.
				if ($exclude)
				{
					if (preg_match(chr(1) . $exclude . chr(1), $folder))
					{
						continue;
					}
				}

				$options[] = Dropdown::option($folder, $folder);
			}
		}

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

		return $options;
	}
653397
public function getOptions()
    {
        $selectedValues = $this->getValueArray();
        $defaultItems = $this->getDefaultItems();
        $disabledItems = $this->getDisabledItems();

        // Generate list of options to display
        $odd = false;
        $formID = $this->ID();
        $options = new ArrayList();
        foreach ($this->getSource() as $itemValue => $title) {
            $itemID = Convert::raw2htmlid("{$formID}_{$itemValue}");
            $odd = !$odd;
            $extraClass = $odd ? 'odd' : 'even';
            $extraClass .= ' val' . preg_replace('/[^a-zA-Z0-9\-\_]/', '_', $itemValue);

            $itemChecked = in_array($itemValue, $selectedValues) || in_array($itemValue, $defaultItems);
            $itemDisabled = $this->isDisabled() || in_array($itemValue, $disabledItems);

            $options->push(new ArrayData(array(
                'ID' => $itemID,
                'Class' => $extraClass,
                'Name' => "{$this->name}[{$itemValue}]",
                'Value' => $itemValue,
                'Title' => $title,
                'isChecked' => $itemChecked,
                'isDisabled' => $itemDisabled,
            )));
        }
        $this->extend('updateGetOptions', $options);
        return $options;
    }
872688
public function getGridParentOptions(): array
    {
        $columns[] = 'tl_form_field.type = ?';
        $columns[] = 'tl_form_field.pid = ?';

        $values[] = 'bs_gridStart';
        $values[] = CURRENT_ID;

        $collection = FormFieldModel::findBy($columns, $values);
        $options    = [];

        if ($collection) {
            foreach ($collection as $model) {
                $options[$model->id] = sprintf(
                    '%s [%s]',
                    $model->bs_grid_name,
                    $model->getRelated('bs_grid')->title
                );
            }
        }

        return $options;
    }
1006178
public function getOptions()
    {
        $res = [];
        foreach ($this->getOptionArray() as $index => $value) {
            $res[] = ['value' => $index, 'label' => $value];
        }
        return $res;
    }
1180211
public function getFormValues()
    {
        $this->verifyLayout();
        
        $values = array();

        foreach ($this->layout->getChildrenByType('\\Zepi\\Web\\UserInterface\\Form\\Form', true) as $form) {
            $values = $this->extractFormValues($form);
        }
        
        return $values;
    }
1214567
public function getOptions()
    {
        $options = [];
        if (sizeof($this->headers) > 0) {
            $options = [
                CURLOPT_HTTPHEADER => $this->getHeaders()
            ];
        }

        return $options + $this->options + $this->getDefaultOptions();
    }
1175954
protected function getPHPActionOptions() : array
    {
        $options = [];
        $addOption = $this->io->ask('  <info>Add a validator option?</info> <comment>[y,n]</comment> ', 'n');
        while (IOUtil::answerToBool($addOption)) {
            $options = array_merge($options, $this->getPHPActionOption());
            // add another action?
            $addOption = $this->io->ask('  <info>Add another validator option?</info> <comment>[y,n]</comment> ', 'n');
        }
        return $options;
    }
1303243
protected function getOptions(): array
	{
		$options = [];

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

		sort($options);

		return $options;
	}
366348
protected function getOptions()
	{
		// Initialise variables
		$folder = $this->element['folder'];

		if (!empty($folder))
		{
			// Get list of plugins
			$db = App::get('db');
			$query = $db->getQuery()
				->select('element', 'value')
				->select('name', 'text')
				->from('#__extensions')
				->whereEquals('folder', $folder)
				->whereEquals('enabled', '1')
				->order('ordering', 'asc')
				->order('name', 'asc');
			$db->setQuery($query->toString());

			$options = $db->loadObjectList();

			$lang = App::get('language');
			foreach ($options as $i => $item)
			{
				$extension = 'plg_' . $folder . '_' . $item->value;
					$lang->load($extension . '.sys', PATH_APP . '/plugins/' . $folder . '/' . $item->value, null, false, true)
				||	$lang->load($extension . '.sys', PATH_CORE . '/plugins/' . $folder . '/' . $item->value, null, false, true);

				$options[$i]->text = $lang->txt($item->text);
			}

			if ($db->getErrorMsg())
			{
				return '';
			}
		}
		else
		{
			App::abort(500, App::get('language')->txt('JFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'));
		}

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

		return $options;
	}
1360620
protected function getOptions()
	{
		$options = array();

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

			// Set up option elements.
			$tmp = new stdClass;
			$tmp->value = (string) $option['value'];
			$tmp->text = trim((string) $option);
			$tmp->disable = ((string) $option['disabled'] == 'true');
			$tmp->class = (string) $option['class'];
			$tmp->onclick = (string) $option['onclick'];

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

		reset($options);

		return $options;
	}
1352071
private function getViewOptions(): array
    {
        // search url if is a saved one
        list($plugin, $controller) = pluginSplit($this->entity->get('model'));

        $title = $this->entity->has('name') ? $this->entity->get('name') : $controller;
        $url = ['plugin' => $plugin, 'controller' => $controller, 'action' => 'search', $this->entity->get('id')];

        $result = ['title' => $title, 'url' => $url];

        if ($this->getExport()) {
            $result['exportUrl'] = Router::url([
                'plugin' => $plugin,
                'controller' => $controller,
                'action' => 'export-search',
                $this->entity->get('id'),
                $this->entity->get('name')
            ]);
        }

        return $result;
    }