Generates row options array from this class properties.
@return array The row options.
776447
protected function generateGroupOptions() {
		
		$options = array();
		$fields = array('widgetOptions, label', 'labelOptions', 'errorOptions', 'hint', 'hintOptions', 'prepend', 'prependOptions',
			'append', 'appendOptions', 'enableAjaxValidation', 'enableClientValidation');

		foreach ($fields as $prop) {
			if (isset($this->$prop)) {
				$options[$prop] = $this->$prop;
			}
		}
		
		$options['widgetOptions']['data'] = $this->items;

		return $options;
	}
932262
public function toOptionArray() {
        return [
            [
                'value' => self::BUTTON_BLACK,
                'label' => __('Black')
            ],
            [
                'value' => self::BUTTON_WHITE,
                'label' => __('White')
            ],
            [
                'value' => self::BUTTON_WHITE_LINE,
                'label' => __('White with line')
            ],
        ];
    }
1152942
protected function columns()
    {
        $this->data    = $this->setData();
        $column_widths = $this->getColumnWidths();
        $output        = [];
        $count         = count(reset($this->data));

        for ($i = 0; $i < $count; $i++) {
            $output[] = $this->getRow($i, $column_widths);
        }

        return $output;
    }
897073
public function getOptionsArray()
    {
        $options = array(
            's.q' => $this->query,
            's.ps' => $this->pageSize,
            's.pn' => $this->pageNumber,
            's.ho' => $this->holdings ? 'true' : 'false',
            's.dym' => $this->didYouMean ? 'true' : 'false',
            's.l' => $this->language,
        );
        if (!empty($this->idsToFetch)) {
            $options['s.fids'] = implode(',', (array)$this->idsToFetch);
        }
        if (!empty($this->facets)) {
            $options['s.ff'] = $this->facets;
        }
        if (!empty($this->filters)) {
            $options['s.fvf'] = $this->filters;
        }
        if ($this->maxTopics !== false) {
            $options['s.rec.topic.max'] = $this->maxTopics;
        }
        if (!empty($this->groupFilters)) {
            $options['s.fvgf'] = $this->groupFilters;
        }
        if (!empty($this->rangeFilters)) {
            $options['s.rf'] = $this->rangeFilters;
        }
        if (!empty($this->sort)) {
            $options['s.sort'] = $this->sort;
        }
        if ($this->expand) {
            $options['s.exp'] = 'true';
        }
        if ($this->openAccessFilter) {
            $options['s.oaf'] = 'true';
        }
        if ($this->highlight) {
            $options['s.hl'] = 'true';
            $options['s.hs'] = $this->highlightStart;
            $options['s.he'] = $this->highlightEnd;
        } else {
            $options['s.hl'] = 'false';
            $options['s.hs'] = $options['s.he'] = '';
        }
        return $options;
    }
251114
public function getRow()
	{
		$alias = $this->getAlias();
		$rows = static::findById( $this->id )->loadArray();
		$row = array_shift( $rows );
		$ret = $this->fromArray( $row[ $alias ], true );
		return $ret;
	}
165064
public function getRows()
    {
        $query = $this->getQuery();
        
        if (!empty($this->columns)) {
            $query->select(implode(', ', $this->columns));
        }
        
        foreach ($this->sort as $key => $value) {
            $query->sortBy($key, $value);
        }
        
        if ($this->range) {
            $query->limit($this->start, $this->range);
        }
        
        if (!empty($this->group)) {
            $query->groupBy($this->group);
        }
        
        return $this->database->query($query, $this->database->getBinds());
    }
512842
public function getRows()
    {
        $out = new ArrayList();
        foreach ($this->rows as $row) {
            $columns = new ArrayList();
            foreach ($row as $column => $value) {
                $columns->push(
                    new ArrayData(array(
                        "Heading"=> $column,
                        "Value" => $value
                    ))
                );
            }
            $out->push(
                new ArrayData(array(
                    "Columns" => $columns
                ))
            );
        }
        return $out;
    }
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;
    }
1297307
public function fetchRow()
    {
        $opts = $this->options;
        $opts['limit'] = 1;
        
        $sql = QueryBuilder::optionsToSql($opts);
        $row = $this->getDb()->getRow($sql);
        
        return $row;        
    }
338025
public function toArray()
    {
        $rowData = array();
        foreach ($this->cells as $cell) {
            $rowData[] = $cell->getValue();
        }
        
        return $rowData;
    }
33823
public function toOptionArray()
    {
        $option = [];
        foreach ($this->databases as $dbCode => $dbTitle) {
            $option[] = ['value' => $dbCode, 'label' => $dbTitle];
        }
        return $option;
    }
28748
private function getDatatableOptions(): array
    {
        list($plugin, $controller) = pluginSplit($this->entity->get('model'));

        $result = [
            'table_id' => '#' . $this->getTableId(),
            'order' => [$this->getOrderField(), $this->getOrderDirection()],
            'ajax' => [
                'url' => Router::url([
                    'plugin' => $plugin,
                    'controller' => $controller,
                    'action' => $this->action,
                    $this->preSaveId
                ]),
                'columns' => $this->getDatatableColumns(),
                'extras' => ['format' => 'pretty']
            ],
        ];

        if (! $this->getGroupByField() && $this->batch) {
            $result['batch'] = ['id' => Configure::read('Search.batch.button_id')];
        }

        return $result;
    }
541622
protected function getOptions()
    {
        //shameless copy
        return [
            ['connection', 'c', InputOption::VALUE_OPTIONAL, 'The database connection to use.', $this->config->get('database.default')],
            ['tables', 't', InputOption::VALUE_OPTIONAL, 'A list of Tables you wish to Generate Migrations for separated by a comma: users,posts,comments'],
            ['path', 'p', InputOption::VALUE_OPTIONAL, 'Where should the file be created?'],
            ['namespace', 'ns', InputOption::VALUE_OPTIONAL, 'Explicitly set the namespace'],
            ['overwrite', 'o', InputOption::VALUE_NONE, 'Overwrite existing models ?'],
        ];
    }
201973
public function getGridOptions(): array
    {
        $collection = GridModel::findAll(['order' => 'tl_bs_grid.title']);
        $options    = [];

        if ($collection) {
            foreach ($collection as $model) {
                $parent = sprintf(
                    '%s [ID %s]',
                    $model->getRelated('pid')->name,
                    $model->pid
                );

                $options[$parent][$model->id] = sprintf('%s [ID %s]', $model->title, $model->id);
            }
        }

        return $options;
    }
67241
public function getColumnOptions()
    {
        //make sure we only run this once and then return the cached version
        if (empty($this->columnOptions)) {
            foreach ($this->getColumns() as $column) {
                $this->columnOptions[] = $column->getOptions();
            }
        }

        return $this->columnOptions;
    }
495454
public function objectRows()
    {
        // Get properties as defined in object's list metadata
        $properties  = $this->sortProperties();
        $propOptions = $this->propertiesOptions();

        // Collection objects
        $objects = $this->sortObjects();

        // Go through each object to generate an array of properties listed in object's list metadata
        foreach ($objects as $object) {
            if (isset($object['requiredAclPermissions']) && !empty($object['requiredAclPermissions'])) {
                if ($this->hasPermissions($object['requiredAclPermissions']) === false) {
                    continue;
                }
            }

            $objectProperties = [];
            foreach ($properties as $propertyIdent => $propertyData) {
                $property = $object->property($propertyIdent);

                if (isset($propOptions[$propertyIdent]) && is_array($propOptions[$propertyIdent])) {
                    $property->setData($propOptions[$propertyIdent]);
                }

                $this->setupDisplayPropertyValue($object, $property);

                $displayType = $this->display->displayType();
                $this->display->setPropertyVal($object->propertyValue($propertyIdent));

                $propertyValue = $this->view()->renderTemplate($displayType, $this->display);

                $cell = $this->parsePropertyCell($object, $property, $propertyValue);
                $objectProperties[] = $cell;
            };

            $this->currentObj = $object;
            $this->currentObjId = $object->id();

            $row = $this->parseObjectRow($object, $objectProperties);

            yield $row;
        }

        $this->currentObj = null;
        $this->currentObjId = null;
    }
1328774
private function getOptions()
    {
        $options = [];
        foreach($this->optionsMap as $property => $name) {
            $options[$name] = $this->options[$property];
        }
        return $options;
    }