Push columns onto parts

@return void
553228
protected function pushColumns()
    {
        if( !$this->columns || $this->columns == '*' ) {
            $this->parts[] = '*';
        } else if( is_array($this->columns) ) {
            $cols = array();
            foreach( $this->columns as $col ) {
                $cols[] = $this->quoteIdentifierIfNotExpression($col);
            }
            $this->parts[] = join(', ', $cols);
        } else if( is_string($this->columns) ) {
            $this->parts[] = $this->quoteIdentifierIfNotExpression($this->columns);
        } else if( $this->columns instanceof Expression ) {
            $this->parts[] = (string) $this->columns;
        }
    }
186498
protected function loadColumns()
    {
        $statement = $this->db->query('SHOW COLUMNS FROM ' . $this->config->getDbTable());

        $this->columns = array();
        while (false !== ($column = $statement->fetchObject())) {
            $this->columns[] = new Column($column, $this->config->getDbPrefix());
        }
    }
84696
protected function pushTable()
    {
        if( empty($this->table) ) {
            throw new LogicException('No table specified');
        }
        $this->parts[] = $this->quoteIdentifierIfNotExpression($this->table);
    }
449030
public function handleShowAllColumns()
	{
		$this->deleteSessionData('_grid_hidden_columns');
		$this->saveSessionData('_grid_hidden_columns_manipulated', true);

		$this->redrawControl();

		$this->onRedraw();
	}
356837
public function addColumns(array $cols) {
        foreach ($cols as $col) {
            $this->cols[] = DataColumn::fromArray($col);
        }
    }
1116470
public function addColumns(array $columns)
    {
        /*
         * Build a final collection of list column objects
         */
        foreach ($columns as $columnName => $config) {
            $this->allColumns[$columnName] = $this->makeListColumn($columnName, $config);
        }
    }
483176
protected function addColumns($columns)
    {
        $model = $this->models->first();

        if ($columns) {
            foreach ($columns as $key => $field) {
                if (is_numeric($key)) {
                    // Simple non-keyed array passed.
                    $new_column = Column::create($field);
                } else {
                    // Key also matters, apparently
                    $new_column = Column::create($key, $field);
                }

                $new_column->setOptionsFromModel($model);

                $this->columns[] = $new_column;
            }
        }
    }
78075
private function fillConstants(): void
  {
    foreach ($this->columns as $table_name => $table)
    {
      foreach ($table as $column_name => $column)
      {
        if (isset($this->columns[$table_name][$column_name]['constant_name']))
        {
          $this->constants[$column['constant_name']] = $column['length'];
        }
      }
    }

    foreach ($this->labels as $label => $id)
    {
      $this->constants[$label] = $id;
    }

    ksort($this->constants);
  }
974379
public function addColumns(array $columns, $joinName=null) {
    if ($joinName === null) {
      // add normal column
      $this->columns = $this->columns + $columns;
    }
    else {
      // add column to join
      $joins = [];
      foreach ($this->joins->getJoins() as $join) {
        if ($join['name'] == $joinName || in_array($joinName, array_keys($join['name']))) {
          $join['columns'] += $columns;
        }
        $joins[] = $join;
      }
      $this->joins->reset();
      foreach ($joins as $join) {
        parent::join($join['name'], $join['on'], $join['columns'], $join['type']);
      }
    }
  }
567553
protected function assemble()
    {
        $this->push('DELETE FROM');
        $this->pushTable();
        $this->pushWhere();
        $this->pushOrder();
        $this->pushLimit();

        $this->query = join(' ', $this->parts);
    }
352464
protected function buildColumnDispatch()
    {
        $this->columnDispatch = array();

        foreach ($this->getComponents() as $item) {
            if ($item instanceof GridField_ColumnProvider) {
                $columns = $item->getColumnsHandled($this);

                foreach ($columns as $column) {
                    $this->columnDispatch[$column][] = $item;
                }
            }
        }
    }
976323
protected function setPrependColumns()
    {
        $prependColumns = [
            'numbering' => [
                'field'   => 'numbering',
                'label'   => '#',
                'attr'    => [
                    'width' => '5%',
                ],
                'format'  => 'number',
                'show'    => true,
                'sorting' => true,
                'hiding'  => false,
                'options' => false,
                'nested'  => false,
                'content' => '',
            ],
            'id'        => [
                'field'   => 'id',
                'label'   => 'ID',
                'attr'    => [
                    'class' => 'text-right',
                    'width' => '3%',
                ],
                'format'  => 'txt',
                'show'    => true,
                'sorting' => true,
                'hiding'  => true,
                'options' => false,
                'nested'  => false,
            ],
            'checkbox'  => [
                'field'   => 'id',
                'label'   => new Ui\Components\Form\Elements\Checkbox([
                    'data-toggle' => 'table-crud-checkbox',
                ]),
                'attr'    => [
                    'width' => '2%',
                ],
                'format'  => 'checkbox',
                'show'    => true,
                'sorting' => false,
                'hiding'  => false,
                'options' => false,
                'nested'  => false,
            ],
            'images'    => [
                'field'   => 'images',
                'label'   => null,
                'attr'    => [
                    'width' => '5%',
                ],
                'format'  => 'image',
                'show'    => true,
                'sorting' => false,
                'hiding'  => true,
                'options' => false,
                'nested'  => false,
            ],
        ];

        foreach ($prependColumns as $key => $column) {
            if ($this->config[ $key ] === true) {
                $this->columns[ $key ] = $column;
            }
        }
    }
604425
protected function registerColumns()
    {
        $this->hook->action('admin_init', function () {
            $this->getSingularity()->columns($this->columns());
        })->dispatch();
    }
1248511
public function columns($columns)
    {
        if (is_null($this->columns)) {
            $this->columns = $this->element('()', $columns);
        } else {
            $this->columns->append($columns);
        }

        return $this;
    }
284381
public function addColumns($cols) {
        if (sizeof($cols) > 0) {
            foreach($cols as $col) {
                if (sizeof($col) == 3) {
                    $this->addColumn($col[0], $col[1], $col[2]);
                } else if (sizeof($col) == 2) {
                    $this->addColumn($col[0], $col[1]);

                }
            }
        }
    }
440973
public function columns()
    {
        if ($this->columns->isEmpty()) {
            $this->columns->push($this->current);
        }

        return $this->columns;
    }
91689
protected function addFluentIndexes()
	{
		foreach ( $this->columns as $column )
		{
			foreach ( ['primary', 'unique', 'index'] as $index )
			{
				// If the index has been specified on the given column, but is simply
				// equal to "true" (boolean), no name has been specified for this
				// index, so we will simply call the index methods without one.
				if ( $column->$index === true )
				{
					$this->$index( $column->name );

					continue 2;
				}

				// If the index has been specified on the column and it is something
				// other than boolean true, we will assume a name was provided on
				// the index specification, and pass in the name to the method.
				elseif ( isset( $column->$index ) )
				{
					$this->$index( $column->name, $column->$index );

					continue 2;
				}
			}
		}
	}