Format two field names of this filter.

@param string $column

@return array
971321
protected function formatName($column)
    {
        $columns = explode('.', $column);

        if (count($columns) == 1) {
            $name = $columns[0];
        } else {
            $name = array_shift($columns);

            foreach ($columns as $column) {
                $name .= "[$column]";
            }
        }

        return ['start' => "{$name}[start]", 'end' => "{$name}[end]"];
    }
1038054
protected function getTransfredFields(array $columns)
    {
        $collection = [];

        foreach ($columns as $column) {
            // While constructing the array for each field
            // there is no need to set translations for options
            // or even labels. This step is handled using the FieldTransformer
            $properties['name'] = $column->COLUMN_NAME;
            $properties['is-nullable'] = ($column->IS_NULLABLE == 'YES');
            $properties['data-value'] = $column->COLUMN_DEFAULT;
            $properties['data-type'] = $this->getDataType($column->DATA_TYPE, $column->COLUMN_TYPE);
            $properties['data-type-params'] = $this->getPrecision($column->CHARACTER_MAXIMUM_LENGTH, $column->DATA_TYPE, $column->COLUMN_TYPE);
            $properties['is-primary'] = in_array($column->COLUMN_KEY, ['PRIMARY KEY', 'PRI']);
            $properties['is-index'] = ($column->COLUMN_KEY == 'MUL');
            $properties['is-unique'] = ($column->COLUMN_KEY == 'UNI');
            $properties['is-auto-increment'] = ($column->EXTRA == 'AUTO_INCREMENT');
            $properties['comment'] = $column->COLUMN_COMMENT ?: null;
            $properties['options'] = $this->getHtmlOptions($column->DATA_TYPE, $column->COLUMN_TYPE);
            $properties['is-unsigned'] = (strpos($column->COLUMN_TYPE, 'unsigned') !== false);

            $constraint = $this->getForeignConstraint($column->COLUMN_NAME);

            $properties['foreign-constraint'] = !is_null($constraint) ? $constraint->toArray() : null;

            if (intval($column->CHARACTER_MAXIMUM_LENGTH) > 255
                || in_array($column->DATA_TYPE, $this->largeDataTypes)) {
                $properties['is-on-index'] = false;
            }

            $collection[] = $properties;
        }

        $localeGroup = Helpers::makeLocaleGroup($this->tableName);

        $fields = FieldTransformer::fromArray($collection, $localeGroup, $this->languages);

        // At this point we constructed the fields collection with the default html-type
        // We need to set the html-type using the config::getEloquentToHtmlMap() setting
        $this->setHtmlType($fields);

        return $fields;
    }
206165
protected function prepareBindingColumn($column)
    {
        $count = $this->columnCountForWhereClause($column);
        return ($count > 0) ? $column .'_'. ($count + 1) : $column;
    }
269466
private function _select($column)
    {
        if ($column === 'all' || $column == '*') {
            $this->selectColumns = $this->quoteIdentifier(
                    self::cyrus()->getTableName()
                ).'.*';
        } else {
            if (string_has($column, 'as') || string_has($column, 'AS')) {
                return $this->selectExpr($column);
            }

            $this->selectColumns = (string) str_replace(' ', '', $this->quoteIdentifier(explode(',', $column)));
        }

        return $this;
    }
1125473
public function addTablePrefixToColumn(string $column): string
    {
        return ($this->tablePrefixer ?? $this->database->getTablePrefixer())->addTablePrefixToColumn($column);
    }
10280
protected function parseColumn($column) {
		if ($column instanceof Column) {
			$type = $column->getType();
			return empty($type) ? $column->getName() : $column->getName() . ':' . $type;
		}
		
		return $column;
	}
985704
protected function parseCols()
    {
        if (!isset($this->parts['cols']) || !is_array($this->parts['cols']) || count($this->parts['cols']) < 1) {
            return '*';
        } else {
            $selectParts = [];

            foreach ($this->parts['cols'] as $itemSelect) {
                if (is_array($itemSelect)) {
                    $field = isset($itemSelect[0]) ? $itemSelect[0] : false;
                    $alias = isset($itemSelect[1]) ? $itemSelect[1] : false;
                    $protected = isset($itemSelect[2]) ? $itemSelect[2] : true;

                    $selectParts[] = ($protected ? $this->protect($field) : $field).(!empty($alias) ? ' AS '.$this->protect($alias) : '');
                } else {
                    $selectParts[] = $itemSelect;
                }
            }

            return implode(', ', $selectParts);
        }
    }
653098
public function getColumnChildren($column)
    {
        $children = $this->get('children');
        if (isset($children[$column])) {
            return $children[$column];
        }

        return [];
    }
379955
private function filter( $data, $columns ) {
		$_format  = [];
		$_data    = [];
		$_columns = $columns;
		foreach ( $data as $k => $v ) {
			$columns = $_columns;
			list( $name, $columns ) = $this->get_field_data( $k, $columns );
			if ( isset( $columns[ $k ] ) ) {
				$_format[] = $columns[ $k ]['format'];
			} else {
				$_format[] = '%s';
			}
			$_data[ $name ] = $v;
		}

		return [ $_data, $_format ];
	}
347999
protected function formatFieldName(string $field): string {
        if ($this->getTranslateFieldNames()) {
            return $this->translate($field);
        } else {
            return $field;
        }
    }
1042724
public function generateColumnOptions(Column $column)
    {
        $options = [];

        $keys = ['length', 'default', 'collation', 'null', 'precision', 'scale', 'after', 'update', 'comment'];
        foreach ($keys as $key) {
            $method = "get{$key}";
            if ($key === 'length') $method = 'getLimit';

            $value = $column->$method();

            if ($key === 'collation') {
                if ($value === null) {
                    $key = 'charset';
                    $value = $column->getCharset();
                }
            }
            if ($value === null) continue;
            if ($key === 'null' && $value === false) continue;

            $options[$key] = $value;
        }
        
        $code = $this->valuetize($options);
        return $code === '[]' ? '' : ', ' . $code;
    }
23830
public function getAttributes($column, $schema)
    {
        $fields = str_replace($column . ':', '', $schema);

        return $this->hasCustomAttribute($column) ? $this->getCustomAttribute($column) : explode(':', $fields);
    }
164707
public function format_expander($field, $column)
    {
        if (!$this->current_row[$field]) {
            $this->current_row[$field] = $column['descr'];
        }

        // TODO:
        // reformat this using Button, once we have more advanced system to
        // bypass rendering of sub-elements.
        // $this->current_row[$field] = $this->add('Button',null,false)
        $key = $this->name.'_'.$field.'_';
        $id = $key.$this->app->normalizeName($this->model->id);
        $class = $key.'expander';

        $this->current_row_html[$field] =
            '<input type="checkbox" '.
                'class="'.$class.'" '.
                'id="'.$id.'" '.
                'rel="'.$this->app->url(
                    $column['page'] ?: './'.$field,
                    array(
                        'expander' => $field,
                        'expanded' => $this->name,
                        'cut_page' => 1,
                        // TODO: id is obsolete
                        //'id' => $this->model->id,
                        $this->columns[$field]['refid'].'_'.$this->model->id_field => $this->model->id,
                    )
                ).'" '.
            '/>'.
            '<label for="'.$id.'" style="cursor:pointer;"><a class="atk-button-small">'.
            $this->current_row[$field].'</a></label>';
    }
219503
protected function _matchColumnString($column)
    {
        $matches = [];
        if (!preg_match('/^([\w\.]+)(:(\w*))?(:(.*))?$/', $column, $matches)) {
            throw new InvalidConfigException(\Yii::t('skeeks/cms',
                "Invalid column configuration for '{column}'. The column must be specified in the format of 'attribute', 'attribute:format' or 'attribute:format: label'.",
                ['column' => $column]));
        }
        return $matches;
    }
1085372
public function filterAndConvertToArray($columns)
    {
        $this->columns = [];
        $columns = explode(',', $columns);

        foreach ($columns as $column) {
            try {
                list($col, $val) = explode(':', $column, self::EXPLODE_MAX_LIMIT);
            } catch (\Exception $e) {
                throw new \Exception('Unable to explode columns based on ":" separator');
            }

            $val = $this->checkForKeyword(trim($val));
            $this->columns[trim($col)] = $val;
        }

        return $this;
    }
491484
protected function buildColumns($columns)
    {
        if (!is_array($columns)) {
            if ($columns instanceof Aggregation) {
                $columns->setFieldsSql($this->buildColumns($columns->getFields()));

                return $this->getAdapter()->quoteSql($columns->toSQL());
            } elseif (false !== strpos($columns, '(')) {
                return $this->getAdapter()->quoteSql($columns);
            }
            $columns = preg_split('/\s*,\s*/', $columns, -1, PREG_SPLIT_NO_EMPTY);
        }
        foreach ($columns as $i => $column) {
            if ($column instanceof Expression) {
                $columns[$i] = $this->getAdapter()->quoteSql($column->toSQL());
            } elseif (false !== strpos($column, 'AS')) {
                if (preg_match('/^(.*?)(?i:\s+as\s+|\s+)([\w\-_\.]+)$/', $column, $matches)) {
                    list(, $rawColumn, $rawAlias) = $matches;
                    $columns[$i] = $this->getQuotedName($rawColumn).' AS '.$this->getQuotedName($rawAlias);
                }
            } elseif (false === strpos($column, '(')) {
                $columns[$i] = $this->getQuotedName($column);
            }
        }

        return is_array($columns) ? implode(', ', $columns) : $columns;
    }
1104309
public function values($column) {
		$res = [];
		while($row = $this->next())
			$res[] = $row[$column];
		return $res;
	}