Answers an array of options for the show fields.

@return array
348205
public function getShowOptions()
    {
        return [
            self::SHOW_NONE => _t(__CLASS__ . '.NONE', 'None'),
            self::SHOW_FIRST => _t(__CLASS__ . '.FIRST', 'First'),
            self::SHOW_LAST => _t(__CLASS__ . '.LAST', 'Last'),
            self::SHOW_ALL => _t(__CLASS__ . '.ALL', 'All')
        ];
    }
1364007
public function VisibleFields()
    {
        $visibleFields = new FieldList();

        foreach ($this as $field) {
            if (!($field instanceof HiddenField)) {
                $visibleFields->push($field);
            }
        }

        return $visibleFields;
    }
1328774
private function getOptions()
    {
        $options = [];
        foreach($this->optionsMap as $property => $name) {
            $options[$name] = $this->options[$property];
        }
        return $options;
    }
981086
public function getOptions()
    {
        $options = [];
        foreach ($this->toOptionArray() as $values) {
            $options[$values['value']] = __($values['label']);
        }
        return $options;
    }
386768
protected function magic_get_layout_options() {
        if (!is_array($this->_layout_options)) {
            $this->_layout_options = $this->_theme->pagelayout_options($this->pagelayout);
        }
        return $this->_layout_options;
    }
416125
public function toOptionArray()
    {
        $fields[] = [
            'label' => __('---- Default Option ----'),
            'value' => '0',
        ];
        $apiEnabled = $this->helper->isEnabled($this->helper->getWebsite());
        //get datafields options
        if ($apiEnabled) {
            $datafields = $this->getDataFields();

            //set the api error message for the first option
            if (isset($datafields->message)) {
                //message
                $fields[] = [
                    'value' => 0,
                    'label' => $datafields->message,
                ];
            } else {
                //loop for all datafields option
                foreach ($datafields as $datafield) {
                    if (isset($datafield->name)
                        && $datafield->visibility == 'Public'
                    ) {
                        $fields[] = [
                            'value' => $datafield->name,
                            'label' => $datafield->name,
                        ];
                    }
                }
            }
        }

        return $fields;
    }
316152
public function toOptionArray()
    {
        $fields[] = [
            'label' => __('---- Default Option ----'),
            'value' => '0',
        ];
        $website = $this->helper->getWebsite();
        $apiEnabled = $this->helper->isEnabled($website);

        //get address books options
        if ($apiEnabled) {
            $addressBooks = $this->getAddressBooks();
            //set the error message to the select option
            if (isset($addressBooks->message)) {
                $fields[] = [
                    'value' => 0,
                    'label' => $addressBooks->message,
                ];
            }

            $subscriberAddressBook
                = $this->helper->getSubscriberAddressBook($this->helper->getWebsite());

            //set up fields with book id and label
            foreach ($addressBooks as $book) {
                if (isset($book->id) && $book->visibility == 'Public'
                    && $book->id != $subscriberAddressBook
                ) {
                    $fields[] = [
                        'value' => $book->id,
                        'label' => $book->name,
                    ];
                }
            }
        }

        return $fields;
    }
1039080
protected function get_options(){
        $terms = get_terms($this->name);
        if( !$terms || is_wp_error($terms) ){
            return [];
        }else{
            $result = [];
            foreach( $terms as $term ){
                $result[$term->term_id] = $term->name;
            }
            return $result;
        }
    }
715338
private function get_options() {
        if (!isset($this->field->param5)) {
            $this->field->param5 = 0;
        }
        $options = array();
        $options['trusttext'] = false;
        $options['forcehttps'] = false;
        $options['subdirs'] = false;
        $options['maxfiles'] = -1;
        $options['context'] = $this->context;
        $options['maxbytes'] = $this->field->param5;
        $options['changeformat'] = 0;
        $options['noclean'] = false;
        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;
    }
483216
public function getOptions()
    {
        $options = [];
        foreach ($this->options as $name => $option) {
            $options[$name] = $option->getValue();
        }

        return $options;
    }
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'),
        ];
    }
662192
protected function getOptions()
    {
        $options = $this->options ? $this->options->toArray() : [];

        if ($this->topic && !$this->topic->hasOnlyOneTopic()) {
            $options = array_merge($options, $this->topic->build());
        }

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

        foreach ($this->tree->getChildren() as $child_node) {
            $this->flattenTree($options, $child_node);
        }

        return $options;
    }
666765
public function getDropdownOptions()
    {
        $options = Collection::make([]);

        $dropdowns = $this->propertyDropdownOptions;
        if (null !== $dropdowns && $dropdowns->count() > 0) {
            foreach ($dropdowns as $dropdown) {
                $dropdown->display_text = $dropdown->getDisplayText();
                $options->push($dropdown);
            }
        }

        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;
	}
1256893
public function getOptions()
    {
        $options = [];
        foreach ($this->childNodes as $child) {
            if ($child instanceof Select\Option) {
                $options[] = $child;
            } else if ($child instanceof Select\Optgroup) {
                foreach ($child->getChildren() as $c) {
                    if ($c instanceof Select\Option) {
                        $options[] = $c;
                    }
                }
            }
        }
        return $options;
    }