Adds multiple columns at the end of the array
the column should be an associative array, that can have 'label', 'id' and 'type'
@param array $cols
356837
public function addColumns(array $cols) {
        foreach ($cols as $col) {
            $this->cols[] = DataColumn::fromArray($col);
        }
    }
4846
public function columns(array $columns)
    {
        $this->collection = new Collection;

        foreach ($columns as $key => $value) {
            if (! is_a($value, Column::class)) {
                if (is_array($value)) {
                    $attributes = array_merge(
                        [
                            'name' => $value['name'] ?? $value['data'] ?? $key,
                            'data' => $value['data'] ?? $key,
                        ],
                        $this->setTitle($key, $value)
                    );
                } else {
                    $attributes = [
                        'name' => $value,
                        'data' => $value,
                        'title' => $this->getQualifiedTitle($value),
                    ];
                }

                $this->collection->push(new Column($attributes));
            } else {
                $this->collection->push($value);
            }
        }

        return $this;
    }
297328
public function cols( array $cols ) : array {

		// This function gets called multiple times, so let's cache it for efficiency:
		if ( isset( $this->the_cols ) ) {
			return $this->the_cols;
		}

		$new_cols = [];
		$keep = [
			'cb',
			'title',
		];

		# Add existing columns we want to keep:
		foreach ( $cols as $id => $title ) {
			if ( in_array( $id, $keep, true ) && ! isset( $this->args['admin_cols'][ $id ] ) ) {
				$new_cols[ $id ] = $title;
			}
		}

		# Add our custom columns:
		foreach ( array_filter( $this->args['admin_cols'] ) as $id => $col ) {
			if ( is_string( $col ) && isset( $cols[ $col ] ) ) {
				# Existing (ie. built-in) column with id as the value
				$new_cols[ $col ] = $cols[ $col ];
			} elseif ( is_string( $col ) && isset( $cols[ $id ] ) ) {
				# Existing (ie. built-in) column with id as the key and title as the value
				$new_cols[ $id ] = esc_html( $col );
			} elseif ( 'author' === $col ) {
				# Automatic support for Co-Authors Plus plugin and special case for
				# displaying author column when the post type doesn't support 'author'
				if ( class_exists( 'coauthors_plus' ) ) {
					$k = 'coauthors';
				} else {
					$k = 'author';
				}
				$new_cols[ $k ] = esc_html__( 'Author', 'extended-cpts' );
			} elseif ( is_array( $col ) ) {
				if ( isset( $col['cap'] ) && ! current_user_can( $col['cap'] ) ) {
					continue;
				}
				if ( isset( $col['connection'] ) && ! function_exists( 'p2p_type' ) ) {
					continue;
				}
				if ( ! isset( $col['title'] ) ) {
					$col['title'] = $this->get_item_title( $col ) ?? $id;
				}
				$new_cols[ $id ] = esc_html( $col['title'] );
			}
		}

		# Re-add any custom columns:
		$custom   = array_diff_key( $cols, $this->_cols );
		$new_cols = array_merge( $new_cols, $custom );

		$this->the_cols = $new_cols;
		return $this->the_cols;

	}
1120687
protected function multipleOrder(array $cols, /*# sting */ $suffix)
    {
        foreach ($cols as $col) {
            $this->realOrder($col, $suffix);
        }
    }
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;
            }
        }
    }
64788
protected function addReturning(array $cols)
    {
        foreach ($cols as $col) {
            $this->returning[] = $this->quoteNamesIn($col);
        }
        return $this;
    }
1278871
public function addSortableColumn($columns)
    {
        if ($this->data) {
            foreach ($this->data as $id => $field) {
                if ($field->admin_column_sortable) {
                    $columns[$id] = $field->label;
                }
            }
        }

        return $columns;
    }
781137
public function setColumns(array $columns)
    {
        foreach ($columns as $column) {
            $this->columns->push($column);
        }

        return $this;
    }
451957
function setColumns($columns) {
		$this->columns = array();

		if ($columns === null) {
			return $this;
		}

		if (is_string($columns)) {
			return $this->addColumn($columns);
		}

		foreach ($columns as $alias => &$column) {
			$this->addColumn($column, is_int($alias) ? null : $alias);
		}
		return $this;
	}
769049
public function setColumns(array $columns): self
    {
        foreach ($columns as $column => list($type, $size)) {
            list($type, $size) = $this->validateColumn($type, $size);
            $columns[$column] = [$type, $size];
        }
        $this->columns = $columns;
        return $this;
    }
1652
public function columns($columns)
  {
    if ( is_null($this->columns) ){
      $this->columns = new Element('()', $columns);
    }
    else {
      $this->columns->append($columns);
    }

    return $this;
  }
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);
        }
    }
402540
public function alongWith(array $columns)
	{
		foreach($columns as $key => $value)
		{
			if(strpos($value, '.') === false)
			{
				$columns[$key] = $this->getJunctionTable() . '.' . $value;
			}
		}

		$this->alongWith = $columns;

		return $this;
	}
343622
final public static function addColumnTypeKeys(array $data)
    {
        $columns = self::getTypedColumns(array_keys($data));
        return array_combine($columns, array_merge($columns, $data));
    }
1112848
public function addColumn(Column $column)
    {
        $columns = func_get_args();

        foreach ($columns as $column) {
            $this->columns[$column->columnName] = $column;

            if ($column instanceof AutoIncrementColumn) {
                $this->uniqueIdentifierColumnName = $column->columnName;
            }
        }
    }
1047658
protected function _addSelect(array $columns) {
		if(array_values($columns) === $columns) {
			foreach($columns as $k=>$v) {
				unset($columns[$k]);
				$columns[$v] = $v;
			}
		}
		$this->columns = array_merge($this->columns, $columns);
		return $this;
	}
332870
public function addColumns(array $columns) {
        foreach ($columns as $column => $options) {
            $this->addColumn($column, $options);
        }

        return $this;
    }