Get array of columns mappings and weights.

@return array
550130
public function getWeights()
    {
        $weights = [];

        foreach ($this->columns as $column) {
            $weights[$column->getMapping()] = $column->getWeight();
        }

        return $weights;
    }
607125
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Navn', ''),
            new CensusColumnSexMK($this, 'Køn', ''),
            new CensusColumnAge($this, 'Alder', ''),
            new CensusColumnConditionDanish($this, 'Civilstand', ''),
            new CensusColumnReligion($this, 'Religion', ''),
            new CensusColumnOccupation($this, 'Erhverv', ''),
            new CensusColumnRelationToHead($this, 'Stilling i familien', ''),
            new CensusColumnNull($this, '', ''),
            new CensusColumnNull($this, '', ''),
            new CensusColumnNull($this, '', ''),
            new CensusColumnNull($this, '', ''),
            new CensusColumnNull($this, '', ''),
            new CensusColumnNull($this, '', ''),
        ];
    }
893584
public function columns(): array
    {
        return [
            new CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'),
            new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
            new CensusColumnSexMF($this, 'Sex', 'Sex'),
            new CensusColumnNull($this, 'Race', 'Color or race'),
            new CensusColumnAge($this, 'Age', 'Age at last birthday'),
            new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'),
            new CensusColumnYearsMarried($this, 'Marr', 'Number of years of present marriage'),
            new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'),
            new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'),
            new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'),
            new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'),
            new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'),
            new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
            new CensusColumnNull($this, 'Nat', 'Whether naturalized or alien'),
            new CensusColumnNull($this, 'Lang', 'Whether able to speak English, of if not, give language spoken'),
            new CensusColumnOccupation($this, 'Occupation', 'Trade or profession of, or particular kind of work done by this person'),
            new CensusColumnNull($this, 'Ind', 'General nature of industry'),
            new CensusColumnNull($this, 'Emp', 'Whether an employer, employee, or work on own account'),
            new CensusColumnNull($this, 'Unemp', 'Whether out of work on April 15, 1910'),
            new CensusColumnNull($this, 'Unemp', 'Number of weeks out of work in 1909'),
            new CensusColumnNull($this, 'R', 'Whether able to read'),
            new CensusColumnNull($this, 'W', 'Whether able to write'),
            new CensusColumnNull($this, 'Sch', 'Attended school since September 1, 1909'),
            new CensusColumnNull($this, 'Home', 'Owned or rented'),
            new CensusColumnNull($this, 'Mort', 'Owned free or mortgaged'),
            new CensusColumnNull($this, 'Farm', 'Farm or house'),
            new CensusColumnNull($this, 'CW', 'Whether a survivor of the Union or Confederate Army or Navy'),
            new CensusColumnNull($this, 'Blind', 'Whether blind (both eyes)'),
            new CensusColumnNull($this, 'Deaf', 'Whether deaf and dumb'),
        ];
    }
812936
protected function getColumnSettings()
    {
        //If there is the user input columns then parse them to columns from user input
        //If the user does not input collumns then take the default by looking at data
        // Then mixed with default in meta
        $meta = $this->dataStore->meta();
        $columns = array();
        if ($this->columns != null) {
            foreach ($this->columns as $cKey => $cValue) {
                if (gettype($cValue) == "array") {
                    $columns[$cKey] = array_merge($meta["columns"][$cKey], $cValue);
                } else {
                    $columns[$cValue] = $meta["columns"][$cValue];
                }
            }
        } else {
            $keys = array_keys($this->dataStore[0]);
            foreach ($keys as $ckey) {
                $columns[$ckey] = $meta["columns"][$ckey];
            }
        }
        return $columns;
    }
1134364
public function getColumns()
    {
        //make sure we only run this once and then return the cached version
        if (empty($this->columns)) {
            foreach ($this->config->getOption('columns') as $name => $options) {
                //if only a string value was supplied, may sure to turn it into an array
                $object                                           = $this->make($this->parseOptions($name, $options));
                $this->columns[$object->getOption('column_name')] = $object;
            }
        }

        return $this->columns;
    }
29554
protected function getColumns(): array
    {
        return [
            'details' => ['title' => '', 'data' => null, 'defaultContent' => '', 'class' => 'dt-details-control', 'searchable' => false, 'orderable' => false],
            'causer' => ['title' => trans('cortex/foundation::common.causer'), 'name' => 'causer.username', 'searchable' => false, 'orderable' => false, 'render' => 'full.causer_route ? "<a href=\""+full.causer_route+"\">"+data+"</a>" : data', 'responsivePriority' => 0],
            'description' => ['title' => trans('cortex/foundation::common.description'), 'orderable' => false],
            'created_at' => ['title' => trans('cortex/foundation::common.date'), 'render' => "moment(data).format('YYYY-MM-DD, hh:mm:ss A')"],
        ];
    }
94502
private function _getColumns()
    {
        $columns = [];
        foreach ($this->_config['columns'] as $data) {
            $columns[] = new Column($data, $this->_config['view_name']);
        }
        return $columns;
    }
1338356
public function getSortColumns()
    {
        if ($this->_aSortColumns === null) {
            $this->setSortColumns(\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aSortCols'));
        }

        return $this->_aSortColumns;
    }
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.'),
        ];
    }
130849
public function getColumns()
    {
        if (empty($this->_columns)) {
            $properties = $this->getInspector()->getClassProperties();
            foreach ($properties as $property) {
                $annotations = $this->getInspector()
                    ->getPropertyAnnotations($property);
                if ($annotations->hasAnnotation('column')) {
                    $this->_columns[$property] =
                        $annotations->getAnnotation('column');
                    $this->_columns[$property]->field = trim($property, '_');
                }
            }
        }
        return $this->_columns;
    }
1152942
protected function columns()
    {
        $this->data    = $this->setData();
        $column_widths = $this->getColumnWidths();
        $output        = [];
        $count         = count(reset($this->data));

        for ($i = 0; $i < $count; $i++) {
            $output[] = $this->getRow($i, $column_widths);
        }

        return $output;
    }
979973
public function getColumns()
    {
        $columns = array();

        foreach ($this->_columns as $name => $column) {
            $columns[$name] = $this->getColumn($name);
        }

        return $columns;
    }
1057138
private function getColumns()
    {
        $columns = array();
        
        /**
         * Use call_user_func to make sure only public vars are returned
         */
        $vars = call_user_func('get_object_vars', $this);
        
        foreach ( $vars as $key => $value )
        {
            $columns[] = array(
                "name" => $key
            );
        }
        
        return $columns;
    }
732181
public function getAllForeignKeys()
    {
        $columns = array();
        foreach ($this->getColumns() as $column) {
            foreach ($column->getForeignKeys() as $foreignKey) {
                if (array_key_exists($foreignKey->getId(), $columns)) {
                    continue;
                }
                $columns[$foreignKey->getId()] = $foreignKey;
            }
        }

        return $columns;
    }
30878
public function getLocalColumnObjects()
    {
        $columns = array();
        $localTable = $this->getTable();
        foreach ($this->localColumns as $columnName) {
            $columns[] = $localTable->getColumn($columnName);
        }

        return $columns;
    }
216464
public function getColumns()
    {
        $columns = [];

        foreach ($this->columns as $field => $fieldTitle) {
            if (in_array($field, $this->model->getFillable())) {
                if (!$field) {
                    $field = $fieldTitle;
                    $fieldTitle = Str::title($fieldTitle);
                }
                $columns[$field] = $fieldTitle;
                continue;
            }

            // We can replace this with data_get() I believe.
            if (($methodBreaker = strpos($field, '.')) !== false) {
                $method = substr($field, 0, $methodBreaker);
                if (method_exists($this->model, $method)) {
                    if (method_exists($this->model->$method(), $submethod = str_replace($method.'.', '', $field))) {
                        $this->model->$method()->$submethod();

                        $columns[$field] = $fieldTitle;
                        continue;
                    }
                }
            }

            if (is_numeric($field)) {
                $field = $fieldTitle;
                $fieldTitle = Str::title($fieldTitle);
            }

            $columns[$field] = $fieldTitle;
        }

        if (count($columns)) {
            return $columns;
        }

        return [$this->model->getKeyName() => $this->model->getKeyName()];
    }
767573
public function columnMap()
    {
        $columnMap = [];
        $child     = new static();
        $reflect   = new \ReflectionObject($child);
        $props     = $reflect->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED);
        foreach ($props as $prop) {
            if (substr($prop->getName(), 0, 1) !== '_') {
                $output             = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $prop->getName()));
                $columnMap[$output] = $prop->getName();
            }
        }

        return $columnMap;
    }