Get used weight columns
@return Array
767597
public function getWeightColumns() {
        $out = array();
        foreach ($this->_relationConfig as $i => $conf) {
            $out[] = $conf[self::WEIGHT_COLUMN_KEY];
        }
        return $out;
    }
757698
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name of head of family'),
            new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'),
            new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'),
            new CensusColumnNull($this, 'M16-18', 'Free white males 16-18 years'),
            new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'),
            new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'),
            new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'),
            new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'),
            new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'),
            new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'),
            new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'),
            new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'),
            new CensusColumnNull($this, 'FNR', 'Foreigners not naturalized'),
            new CensusColumnNull($this, 'AG', 'No. engaged in agriculture'),
            new CensusColumnNull($this, 'COM', 'No. engaged in commerce'),
            new CensusColumnNull($this, 'MNF', 'No. engaged in manufactures'),
            new CensusColumnNull($this, 'M0', 'Slave males 0-14 years'),
            new CensusColumnNull($this, 'M14', 'Slave males 14-26 years'),
            new CensusColumnNull($this, 'M26', 'Slave males 26-45 years'),
            new CensusColumnNull($this, 'M45', 'Slave males 45+ years'),
            new CensusColumnNull($this, 'F0', 'Slave females 0-14 years'),
            new CensusColumnNull($this, 'F14', 'Slave females 14-26 years'),
            new CensusColumnNull($this, 'F26', 'Slave females 26-45 years'),
            new CensusColumnNull($this, 'F45', 'Slave females 45+ years'),
            new CensusColumnNull($this, 'M0', 'Free colored males 0-14 years'),
            new CensusColumnNull($this, 'M14', 'Free colored males 14-26 years'),
            new CensusColumnNull($this, 'M26', 'Free colored males 26-45 years'),
            new CensusColumnNull($this, 'M45', 'Free colored males 45+ years'),
            new CensusColumnNull($this, 'F0', 'Free colored females 0-14 years'),
            new CensusColumnNull($this, 'F14', 'Free colored females 14-26 years'),
            new CensusColumnNull($this, 'F26', 'Free colored females 26-45 years'),
            new CensusColumnNull($this, 'F45', 'Free colored females 45+ years'),
        ];
    }
888922
protected function getColumns() {
        if ($this->has('columns')) {
            return $this->get('columns', array());
        }
        $data = $this->get('data');
        if (empty($data)) {
            return [];
        }
        $data = (array)$data;
        $columns = array_keys(reset($data));
        $this->set('columns', $columns);
        return $columns;
    }
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;
    }
975927
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name and surname'),
            new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'),
            new CensusColumnConditionEnglish($this, 'Condition', 'Condition'),
            new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'),
            new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'),
            new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'),
            new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'),
            new CensusColumnNull($this, 'Infirm', 'Whether blind or deaf-and-dumb'),
            new CensusColumnNull($this, 'School', 'Number of children between 5 and 13 attending school'),
        ];
    }
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'];
    }
340666
protected function addMissingWeights(array $columns)
    {
        $parsed = [];

        foreach ($columns as $column => $weight) {
            if (is_numeric($column)) {
                list($column, $weight) = [$weight, $this->weight];
            }

            $parsed[$column] = $weight;
        }

        return $parsed;
    }
556048
public function getColumns()
    {
        $columns = ArrayList::create();
        
        foreach ($this->getEnabledChildren() as $child) {
            
            $columns->push(
                ArrayData::create([
                    'Child' => $child,
                    'ColumnClass' => $this->ColumnClass
                ])
            );
            
        }
        
        return $columns;
    }
1073344
private function getFieldWeights()
    {
        // This could be more configurable
        // (see also Storage->searchSingleContentType)
        $searchableTypes = ['text', 'textarea', 'html', 'markdown'];

        $fields = [];
        $slugFields = [];

        // The field(s) that are used by the slug need to be bumped, unless configured explicitly
        foreach ($this->contenttype['fields'] as $config) {
            if ($config['type'] === 'slug' && isset($config['uses'])) {
                $slugFields = (array) $config['uses'];
            }
        }

        // Set the searchweights to the configured value, otherwise default to '50' or '100'
        foreach ($this->contenttype['fields'] as $key => $config) {
            if (in_array($config['type'], $searchableTypes)) {
                $defaultValue = in_array($key, $slugFields) ? 100 : 50;
                $fields[$key] = isset($config['searchweight']) ? $config['searchweight'] : $defaultValue;
            }
        }

        return $fields;
    }
1173084
public function getDirtyColumns()
    {
        $ret = array_keys($this->_cleanData);
        foreach ($this->_getSiblingRows() as $r) {
            $ret = array_merge($ret, $r->getDirtyColumns());
        }
        return $ret;
    }
276897
public function getLeftColumns()
    {
        $columns = array();
        foreach ($this->left as $index => $column) {
            $columns[] = $this->getLeftColumn($index);
        }

        return $columns;
    }
5647
public function get_sort_columns() {
        $result = parent::get_sort_columns();

        $assignment = $this->assignment->get_instance();
        if (empty($assignment->blindmarking)) {
            $result = array_merge($result, array('userid' => SORT_ASC));
        } else {
            $result = array_merge($result, [
                    'COALESCE(s.timecreated, '  . time()        . ')'   => SORT_ASC,
                    'COALESCE(s.id, '           . PHP_INT_MAX   . ')'   => SORT_ASC,
                    'um.id'                                             => SORT_ASC,
                ]);
        }
        return $result;
    }
429821
public function weight()
    {
        $scores = [];
        foreach ($this->results as $result) {
            $scores[] = $this->getResultScore($result);
        }

        return $scores;
    }
168390
public function columns(): array
    {
        $columns = $this->columns ?: [];

        if ( ! count($columns)) {
            $columns = $this->getGroupContentColumns();
        }

        // If columns are set, fill them out if they don't fit the grid
        if ($remainder = $this->getRemainderForColumns($columns)) {
            $columns[ count($columns) - 1 ] += $remainder;
        }

        return $columns;
    }
1218731
public function getCleanUpColumns()
    {

        // load the colums that has to be cleaned-up
        $cleanUpColumns = $this->getConfiguration()->getParam(ConfigurationKeys::CLEAN_UP_EMPTY_COLUMNS);

        // query whether or not the image columns has to be cleaned-up also
        if ($this->getConfiguration()->hasParam(ConfigurationKeys::CLEAN_UP_EMPTY_IMAGE_COLUMNS) &&
            $this->getConfiguration()->hasParam(ConfigurationKeys::CLEAN_UP_EMPTY_IMAGE_COLUMNS, false)
        ) {
            // if yes load the image column names
            $imageTypes = array_keys($this->getImageTypes());

            // and append them to the column names from the configuration
            foreach ($imageTypes as $imageAttribute) {
                $cleanUpColumns[] = $imageAttribute;
            }
        }

        // return the array with the column names that has to be cleaned-up
        return $cleanUpColumns;
    }
279980
public function get_columns() {

		// Lowercase day, for column key
		$day = strtolower( date( 'l', $this->day_start ) );

		// Return Week & Day
		return array(
			'hour' => sprintf( esc_html__( 'Wk. %s', 'wp-event-calendar' ), date_i18n( 'W', $this->today ) ),
			$day   => date_i18n( 'l, F j, Y', $this->day_start ),
		);
	}
953678
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name'),
            new CensusColumnAge($this, 'Age', 'Age'),
            new CensusColumnSexMF($this, 'Sex', 'Sex'),
            new CensusColumnNull($this, 'Color', 'White, black, or mulatto'),
            new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'),
            new CensusColumnNull($this, 'RE', 'Value of real estate owned'),
            new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'),
            new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'),
            new CensusColumnNull($this, 'School', 'Attended school within the year'),
            new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'),
            new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'),
        ];
    }