Gets the columns that are relationship columns

@return array
352373
public function getRelatedColumns()
	{
		//make sure we only run this once and then return the cached version
		if (!sizeof($this->relatedColumns))
		{
			foreach ($this->getColumns() as $column)
			{
				if ($column->getOption('is_related'))
				{
					$this->relatedColumns[$column->getOption('column_name')] = $column->getOption('column_name');
				}
			}
		}

		return $this->relatedColumns;
	}
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;
    }
451444
public function getRelationships()
    {
        if (empty(static::$relationHooks)) {
            $hooks = [];

            $rels = $this->getRelationshipsFromMethods(true);

            $this->getRelationshipsUnknownPolyMorph($rels, $hooks);

            $this->getRelationshipsKnownPolyMorph($rels, $hooks);

            $this->getRelationshipsHasOne($rels, $hooks);

            $this->getRelationshipsHasMany($rels, $hooks);

            static::$relationHooks = $hooks;
        }

        return static::$relationHooks;
    }
1129843
public function getColumns()
    {
        $primaryKey        = $this->getPrimaryKey();
        $primaryKeyColumns = [];

        if ($primaryKey !== null) {
            $primaryKeyColumns = $this->filterColumns($primaryKey->getColumns());
        }

        return array_merge($primaryKeyColumns, $this->getForeignKeyColumns(), $this->_columns);
    }
807050
public function getRelations()
    {
        if (!isset($this->relationships)) {
            $this->relationships = array();
            // load them manually
            $mm = $this->getModelsManager();
            $relationships = $mm->getRelations(get_class($this));
            // Temporary fix because $mm->getRelations() doesn't support hasManyToMany relations right now.
            // get them separately and merge them
            $mtmRelationships = $mm->getHasManyToMany($this);

            $relationships = array_merge($relationships, $mtmRelationships);

            foreach ($relationships as $relation) {
                // todo load custom relationship
                $this->relationships[] = new Relation($relation, $mm);
            }
        }
        return $this->relationships;
    }
378366
protected function buildRelationships()
    {
        if (isset($this->relationships)) {
            return $this->relationships;
        }

        $paths = Util::parseRelationshipPaths($this->includes);

        $relationships = [];

        foreach ($paths as $name => $nested) {
            $relationship = $this->serializer->getRelationship($this->data, $name);

            if ($relationship) {
                $relationshipData = $relationship->getData();
                if ($relationshipData instanceof ElementInterface) {
                    $relationshipData->with($nested)->fields($this->fields);
                }

                $relationships[$name] = $relationship;
            }
        }

        return $this->relationships = $relationships;
    }
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;
    }
480457
public function columns(): array
    {
        return [
            new CensusColumnFullName($this, 'Name', 'Name'),
            new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'),
            new CensusColumnNull($this, 'Home', 'Home owned or rented'),
            new CensusColumnNull($this, 'V/R', 'Value of house, if owned, or monthly rental if rented'),
            new CensusColumnNull($this, 'Radio', 'Radio set'),
            new CensusColumnNull($this, 'Farm', 'Does this family live on a farm'),
            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 CensusColumnAgeMarried($this, 'AM', 'Age at first marriage'),
            new CensusColumnNull($this, 'School', 'Attended school since Sept. 1, 1929'),
            new CensusColumnNull($this, 'R/W', 'Whether able to read and write'),
            new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth'),
            new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father'),
            new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother'),
            new CensusColumnNull($this, 'Lang', 'Language spoken in home before coming to the United States'),
            new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'),
            new CensusColumnNull($this, 'Nat', 'Naturalization'),
            new CensusColumnNull($this, 'Eng', 'Whether able to speak English'),
            new CensusColumnOccupation($this, 'Occupation', 'Trade, profession, or particular kind of work done'),
            new CensusColumnNull($this, 'Industry', 'Industry, business of establishment in which at work'),
            new CensusColumnNull($this, 'Code', 'Industry code'),
            new CensusColumnNull($this, 'Emp', 'Class of worker'),
            new CensusColumnNull($this, 'Work', 'Whether normally at work yesterday or the last regular working day'),
            new CensusColumnNull($this, 'Unemp', 'If not, …'),
            new CensusColumnNull($this, 'Vet', 'Whether a veteran of U.S. military or …'),
            new CensusColumnNull($this, 'War', 'What war or …'),
        ];
    }
428656
public function get($columns = ['*'])
    {
        $builder = $this->applyScopes();

        // If we actually found models we will also eager load any relationships that
        // have been specified as needing to be eager loaded, which will solve the
        // n+1 query issue for the developers to avoid running a lot of queries.
        if (count($models = $builder->getModels($columns)) > 0) {
            $models = $builder->eagerLoadRelations($models);
        }

        return $models;
    }
1250417
public function getRelationshipsAsArray()
    {
        $relationships = $this->getRelationships();

        $relationships = $this->convertRelationshipsToArray($relationships);

        return $this->mergeRelationships($relationships);
    }
1208658
public function getColumns()
    {
        $rawColumns = substr($this->data, 64, 128);
        $columnsString = rtrim($rawColumns, "\0");
        return explode("\0", $columnsString);
    }
763788
public function getStorageColumns()
    {
        $columns = $this->createStorageColumns();

        $namedColumns = [];

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

        return $namedColumns;
    }
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;
    }
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'),
        ];
    }
617163
protected function getSearchableColumns()
    {
        $columns = $this->getColumns();
        $searchable = [];

        foreach ($columns as $column) {
            if (!$column->searchable) {
                continue;
            }

            $searchable[] = $column;
        }

        return $searchable;
    }
761023
public function getComputedColumns()
    {
        //make sure we only run this once and then return the cached version
        if (empty($this->computedColumns)) {
            foreach ($this->getColumns() as $column) {
                if (!$column->getOption('is_related') && $column->getOption('is_computed')) {
                    $this->computedColumns[$column->getOption('column_name')] = $column->getOption('column_name');
                }
            }
        }

        return $this->computedColumns;
    }
394046
private function getColumns()
    {
        $dimensions = $this->getApplication()->getTerminalDimensions();
        if (is_array($dimensions) && count($dimensions) > self::DIMENSION_WIDTH) {
            return $dimensions[self::DIMENSION_WIDTH];
        } else {
            return self::DEFAULT_WIDTH;
        }
    }