Decide which columns we want to display.

@return Column\AbstractColumn[]

@throws \Exception
345341
protected function getColumnsToExport()
    {
        if (is_array($this->columnsToExport)) {
            return $this->columnsToExport;
        }

        $columnsToExport = [];
        foreach ($this->getColumns() as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */

            if (! $column instanceof Column\Action &&
                $column->isHidden() === false &&
                in_array(get_class($column->getType()), $this->allowedColumnTypes)
            ) {
                $columnsToExport[] = $column;
            }
        }
        if (empty($columnsToExport)) {
            throw new \Exception('No columns to export available');
        }

        $this->columnsToExport = $columnsToExport;

        return $this->columnsToExport;
    }
1243679
public function columns(): array
    {
        return [
            new CensusColumnNull($this, '1.Nr.', 'Ordnungs-Nummer.'),
            new CensusColumnGivenNames($this, '2.Vorname', 'I. Vor- und Familienname jeder Person. Vorname.'),
            new CensusColumnSurname($this, '3.Familienname', 'I. Vor- und Familienname jeder Person. Familienname.'),
            new CensusColumnNull($this, '4.männlich', 'II. Geschlecht männlich.'),
            new CensusColumnNull($this, '5.weiblich', 'II. Geschlecht weiblich.'),
            new CensusColumnBirthYear($this, '6.Geburtsjahr', 'III. Alter.'),
            new CensusColumnReligion($this, '7.Religion', 'IV. Religionsbekenntnis.'),
            new CensusColumnNull($this, '8.ledig', 'V. Familienstand. ledig.'),
            new CensusColumnNull($this, '9.verehelicht', 'V. Familienstand. verehelicht.'),
            new CensusColumnNull($this, '10.verwittwet', 'V. Familienstand. verwittwet.'),
            new CensusColumnNull($this, '11.geschieden', 'V. Familienstand. geschieden.'),
            new CensusColumnNull($this, '12.StA_M-S', 'VI. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.'),
            new CensusColumnNull($this, '13.StA', 'VI. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?'),
            new CensusColumnNull($this, '14.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende als See- oder Flußschiffer.'),
            new CensusColumnNull($this, '15.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Land- oder Seereisen.'),
            new CensusColumnNull($this, '16.', 'VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Besuch außerhalb des Orts.'),
            new CensusColumnNull($this, '17.', 'VII. Art des Aufenthalts am Zählungsort. Ueber ein Jahr, oder in anderer Art als nach Spalte 14 bis 16 Abwesende.'),
            new CensusColumnNull($this, '18.Aufenthaltsort', 'VIII. Vermuthlicher Aufenthaltsort zur Zählungszeit.'),
        ];
    }
300695
public function getColumns()
    {
        if (empty($this->columns) && !empty($this->data)) {
            //parse columns from data
            $tmp = array_keys(current($this->data));
            return array_combine($tmp, $tmp);
        }

        return $this->columns;
    }
441600
private function getAdditionalColumns()
    {
        $columns = ['facet_display_mode' => 'fal.facet_display_mode'];

        foreach ($this->overridenColumns as $column) {
            $columns[$column] = new \Zend_Db_Expr("COALESCE(fal.$column, additional_table.$column)");
            $columns['use_default_' . $column] = new \Zend_Db_Expr("IF(fal.$column IS NULL, 1, 0)");
            $columns['default_' . $column] = "additional_table.$column";
        }

        $maxPosition = $this->getMaxPosition() + 1;
        $columns['position'] = new \Zend_Db_Expr("IF(fal.position IS NULL, {$maxPosition} + additional_table.position, fal.position)");

        return $columns;
    }
276897
public function getLeftColumns()
    {
        $columns = array();
        foreach ($this->left as $index => $column) {
            $columns[] = $this->getLeftColumn($index);
        }

        return $columns;
    }
1040083
public function visibleColumnNames()
    {
        $visible = array_filter(explode(',', request(Tools\ColumnSelector::SELECT_COLUMN_NAME)));

        if (empty($visible)) {
            return $this->columnNames;
        }

        array_push($visible, '__row_selector__', '__actions__');

        return collect($this->columnNames)->filter(function ($column) use ($visible) {
            return in_array($column, $visible);
        });
    }
1002704
public function initColumns()
    {
        $elems = $this->node->xpath("value[@key='columns']");
        $this->columns = $this->getFormatter()->createColumns($this, $elems[0]);

        return $this;
    }
670822
protected function setColumns()
    {
        // choose what columns should be displayed in the table.
        // For table display, we need to specify the column name for the result query.

        $this->addCheckableColumn();

        $this->columns['id'] = array(
            'label'         => 'ID',
            'sortable'      => true,
            'table_column'  => 'users.id',
        );

        $this->columns['username'] = array(
            'label'     => 'Username',
            'sortable'  => true,
            'table_column'  => 'users.username',
        );

        $this->columns['email'] = array(
            'label'         => 'Email',
            'sortable'      => true,
            'classes'       => 'some_class some_class2',
            'table_column'  => 'users.email',
            'thead_attr'    => 'style="width:200px" data-some-attr="example"',
        );

        $this->columns['created_at'] = array(
            'label'         => 'Created At',
            'sortable'      => true,
            'table_column'  => 'users.created_at',
        );

        $this->addActionColumn();

    }
1202188
protected function getSummaryColumns()
    {
        $columns = [];

        $model = $this->getSampleModel();
        $columnName = $model->getLabelColumnName();

        if ($columnName != "") {
            $columns[] = $columnName;
        }

        return $columns;
    }
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;
    }
86594
public function getColumns()
    {
        $columns = array();
        $columns[$this->_parent_key] = $this->_child_column;
        if ($this->_polymorphic) {
            $columns['type'] = $this->_type_column;
        }

        return $columns;
    }
556048
public function getColumns()
    {
        $columns = ArrayList::create();
        
        foreach ($this->getEnabledChildren() as $child) {
            
            $columns->push(
                ArrayData::create([
                    'Child' => $child,
                    'ColumnClass' => $this->ColumnClass
                ])
            );
            
        }
        
        return $columns;
    }
1174481
public function getColumnOptions()
	{
		//make sure we only run this once and then return the cached version
		if (!sizeof($this->columnOptions))
		{
			foreach ($this->getColumns() as $column)
			{
				$this->columnOptions[] = $column->getOptions();
			}
		}

		return $this->columnOptions;
	}
1248294
protected function getColumns()
    {
        $availableColumns = array_map('strtolower', $this->headers);

        if ($this->option('compact')) {
            return array_intersect($availableColumns, $this->compactColumns);
        }

        if ($columns = $this->option('columns')) {
            return array_intersect($availableColumns, $columns);
        }

        return $availableColumns;
    }
855618
protected function guessColumns()
    {
        if (empty($this->columns)) {
            $column = [
                'name' => $this->hasModel() ? $this->attribute : $this->name,
                'type' => MultipleInputColumn::TYPE_TEXT_INPUT
            ];

            if ($this->enableGuessTitle && $this->hasModel()) {
                $column['title'] = $this->model->getAttributeLabel($this->attribute);
            }
            $this->columns[] = $column;
        }
    }
515727
public function getColumnNames()
    {
        $columns = array();
        foreach ($this->childs as $column) {
            $columns[] = $column->getColumnName();
        }

        return $columns;
    }
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;
    }