Get the columns to sort by, in the form required by {@link construct_order_by()}.
@return array column name => SORT_... constant.
186420
public function get_sort_columns() {
        if (!$this->setup) {
            throw new coding_exception('Cannot call get_sort_columns until you have called setup.');
        }

        if (empty($this->prefs['sortby'])) {
            return array();
        }

        foreach ($this->prefs['sortby'] as $column => $notused) {
            if (isset($this->columns[$column])) {
                continue; // This column is OK.
            }
            if (in_array($column, get_all_user_name_fields()) &&
                    isset($this->columns['fullname'])) {
                continue; // This column is OK.
            }
            // This column is not OK.
            unset($this->prefs['sortby'][$column]);
        }

        return $this->prefs['sortby'];
    }
161195
public function searchableColumnIndex()
    {
        $searchable = [];
        for ($i = 0, $c = count($this->get('columns')); $i < $c; $i++) {
            if ($this->isColumnSearchable($i, false)) {
                $searchable[] = $i;
            }
        }

        return $searchable;
    }
1094515
private function getColumns()
    {
        $class = new \ReflectionClass(__CLASS__);
        $constants = $class->getConstants();
        $columns = [];
        foreach ($constants as $constant => $value) {
            if (strpos($constant, 'DIAGNOSTIC_') === 0) {
                array_push($columns, $value);
            }
        }
        if (empty($columns)) {
            throw new StorageException('No column to fill into CSV storage');
        }
        return $columns;
    }
1083100
public function makeAdminColumnsSortable($columns)
    {
        $admin_columns = $this->getAdminColumns();
        if (!Arr::iterable($admin_columns)) {
            return $columns;
        }

        foreach ($admin_columns as $k) {
            $columns[$k] = $k;
        }
        return $columns;
    }
1138356
protected function _columnNames()
    {
        $columns = [];
        foreach ($this->_columns as $col) {
            if (is_string($col)) {
                $col = trim($col, '`[]"');
            }
            $columns[] = $col;
        }

        return $columns;
    }
1139154
protected function sortColumns()
    {
        $this->config->getColumns()->sort(function (FieldConfig $a, FieldConfig $b) {
            return $a->getOrder() > $b->getOrder();
        });
    }
752268
public function getColumn(){

		$part = substr($this->input, 0, $this->index);
		$pos = strrpos($part,"\n");
		return $this->index - $pos;
	}
1296900
protected function _getCols()
    {
        if (null === $this->_cols) {
            $this->_setupMetadata();
            $this->_cols = array_keys($this->_metadata);
        }
        return $this->_cols;
    }
515727
public function getColumnNames()
    {
        $columns = array();
        foreach ($this->childs as $column) {
            $columns[] = $column->getColumnName();
        }

        return $columns;
    }
643698
public function getOrderBy()
    {
        $orderColumn = $this->getOrderColumn();

        if (is_array($orderColumn)) {
            // An order by raw statement
            return $orderColumn[0];
        }

        $selectedColumnNames = $this->getSelectColumns();

        if (! in_array($orderColumn, $selectedColumnNames)) {
            throw IncorrectOrderColumn::name($orderColumn);
        }

        $order = request('order');

        return [$orderColumn, $order[0]['dir']];
    }
996116
public function columns() : array
    {
        if ($this->numRows() > 1) {
            return array_map(null, ...$this->samples);
        }

        $n = $this->numColumns();

        $columns = [];

        for ($i = 0; $i < $n; $i++) {
            $columns[] = array_column($this->samples, $i);
        }

        return $columns;
    }
194169
protected function getSortableColumn()
    {
        $reader = new AnnotationReader();
        $reflClass = new ReflectionClass($this->getEntityClass());
        foreach ($reflClass->getProperties() as $property) {
            $reflProperty = new ReflectionProperty($this->getEntityClass(), $property->name);
            $annotation = $reader->getPropertyAnnotation($reflProperty, '\Gedmo\Mapping\Annotation\SortablePosition');
            if ($annotation) {
                return $property->name;
            }
        }
    }
312697
public function getQualifiedOrderByColumns()
    {
        $columns   = $this->cmsOrderBy;
        $qualified = [];

        if (empty($columns)) return [];

        foreach ($columns as $column => $direction) {
            $qualified[ $this->getTable() . '.' . $column ] = $direction;
        }

        return $qualified;
    }
394046
private function getColumns()
    {
        $dimensions = $this->getApplication()->getTerminalDimensions();
        if (is_array($dimensions) && count($dimensions) > self::DIMENSION_WIDTH) {
            return $dimensions[self::DIMENSION_WIDTH];
        } else {
            return self::DEFAULT_WIDTH;
        }
    }
86594
public function getColumns()
    {
        $columns = array();
        $columns[$this->_parent_key] = $this->_child_column;
        if ($this->_polymorphic) {
            $columns['type'] = $this->_type_column;
        }

        return $columns;
    }
820257
public function listColumns()
    {
        $fieldNames = array();
        $field = NULL;
        while ($field = mysqli_fetch_field($this->getResultId())) {
            $fieldNames[] = $field->name;
        }

        return $fieldNames;
    }
872329
public function orderableColumns()
    {
        if (! $this->isOrderable()) {
            return [];
        }

        $orderable = [];
        for ($i = 0, $c = count($this->request->input('order')); $i < $c; $i++) {
            $order_col = (int) $this->request->input("order.$i.column");
            $order_dir = strtolower($this->request->input("order.$i.dir")) === 'asc' ? 'asc' : 'desc';
            if ($this->isColumnOrderable($order_col)) {
                $orderable[] = ['column' => $order_col, 'direction' => $order_dir];
            }
        }

        return $orderable;
    }