Generates a list of property name and labels based on finding the GridColumn annotation.

@return array Hash of grid annotation results: ['columns' => array, 'sort' => string]
337091
protected function readGridAnnotations()
    {
        $metadata = $this->getClassMetadata();
        $reflectionClass = $metadata->getReflectionClass();
        $properties = $reflectionClass->getProperties();

        /** @var Grid $gridAnnotation */
        $sort = null;
        if ($gridAnnotation = $this->reader->getClassAnnotation($reflectionClass, 'Dtc\GridBundle\Annotation\Grid')) {
            $actions = $gridAnnotation->actions;
            $sort = $gridAnnotation->sort;
        }

        $gridColumns = [];
        foreach ($properties as $property) {
            /** @var \Dtc\GridBundle\Annotation\Column $annotation */
            $annotation = $this->reader->getPropertyAnnotation($property, 'Dtc\GridBundle\Annotation\Column');
            if ($annotation) {
                $name = $property->getName();
                $label = $annotation->label ?: $this->fromCamelCase($name);
                $gridColumns[$name] = ['class' => '\Dtc\GridBundle\Grid\Column\GridColumn', 'arguments' => [$name, $label]];
                $gridColumns[$name]['arguments'][] = null;
                if ($annotation->sortable) {
                    $gridColumns[$name]['arguments'][] = ['sortable' => true];
                } else {
                    $gridColumns[$name]['arguments'][] = [];
                }
                $gridColumns[$name]['arguments'][] = $annotation->searchable;
                $gridColumns[$name]['arguments'][] = $annotation->order;
            }
        }

        // Fall back to default column list if list is not specified
        if (!$gridColumns) {
            $gridColumnList = $this->getReflectionColumns();
            /** @var GridColumn $gridColumn */
            foreach ($gridColumnList as $field => $gridColumn) {
                $gridColumns[$field] = ['class' => '\Dtc\GridBundle\Grid\Column\GridColumn', 'arguments' => [$field, $gridColumn->getLabel(), null, ['sortable' => true], true, null]];
            }
        }

        if (isset($actions)) {
            $field = '\$-action';
            $actionArgs = [$field];
            $actionDefs = [];
            /* @var Action $action */
            foreach ($actions as $action) {
                $actionDef = ['label' => $action->label, 'route' => $action->route];
                if ($action instanceof ShowAction) {
                    $actionDef['action'] = 'show';
                }
                if ($action instanceof DeleteAction) {
                    $actionDef['action'] = 'delete';
                }
                $actionDefs[] = $actionDef;
            }
            $actionArgs[] = $actionDefs;

            $gridColumns[$field] = ['class' => '\Dtc\GridBundle\Grid\Column\ActionGridColumn',
                'arguments' => $actionArgs, ];
        }

        $this->sortGridColumns($gridColumns);
        try {
            $sortInfo = $this->extractSortInfo($sort);
            $this->validateSortInfo($sortInfo, $gridColumns);
        } catch (\InvalidArgumentException $exception) {
            throw new \InvalidArgumentException($reflectionClass->getName().' - '.$exception->getMessage(), $exception->getCode(), $exception);
        }

        return ['columns' => $gridColumns, 'sort' => $sortInfo];
    }
1044111
protected function populateAndCacheAnnotationColumns()
    {
        $gridAnnotations = $this->readGridAnnotations();
        $annotationColumns = $gridAnnotations['columns'];

        $sort = $gridAnnotations['sort'];
        if ($annotationColumns) {
            $output = "<?php\nreturn array('columns' => array(\n";
            foreach ($annotationColumns as $field => $info) {
                $class = $info['class'];
                $output .= "'$field' => new $class(";
                $first = true;
                foreach ($info['arguments'] as $argument) {
                    if ($first) {
                        $first = false;
                    } else {
                        $output .= ',';
                    }
                    $output .= var_export($argument, true);
                }
                $output .= '),';
            }
            $output .= "), 'sort' => array(";
            foreach ($sort as $key => $value) {
                $output .= "'$key'".' => ';
                if (null === $value) {
                    $output .= 'null,';
                } else {
                    $output .= "'$value',";
                }
            }
            $output .= "));\n";
        } else {
            $output = "<?php\nreturn false;\n";
        }
        file_put_contents($this->annotationCacheFilename, $output);
        $this->includeAnnotationCache();
    }
1234264
protected function _getVisibleColNames()
    {
        $aColNames = $this->_getColNames();
        $aUserCols = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aCols');
        $aVisibleCols = [];

        // user defined some cols to load ?
        if (is_array($aUserCols)) {
            foreach ($aUserCols as $iKey => $sCol) {
                $iCol = ( int ) str_replace('_', '', $sCol);
                if (isset($aColNames[$iCol]) && !$aColNames[$iCol][4]) {
                    $aVisibleCols[$iCol] = $aColNames[$iCol];
                }
            }
        }

        // no user defined valid cols ? setting defauls ..
        if (!count($aVisibleCols)) {
            foreach ($aColNames as $sName => $aCol) {
                // visible ?
                if ($aCol[1] && !$aColNames[$sName][4]) {
                    $aVisibleCols[$sName] = $aCol;
                }
            }
        }

        return $aVisibleCols;
    }
565459
private function getColumns()
    {
        return [
            [
                'data'      => 'status',
                'name'      => 'articles.published',
                'width'     => '100px',
                'title'     => trans('cms::article.datatable.columns.status'),
                'orderable' => false,
            ],
            [
                'data'  => 'title',
                'name'  => 'articles.title',
                'title' => trans('cms::article.datatable.columns.title'),
            ],
            [
                'data'    => 'alias',
                'name'    => 'articles.alias',
                'visible' => false,
            ],
            [
                'data'    => 'category',
                'name'    => 'category.title',
                'visible' => false,
            ],
            [
                'data'  => 'category',
                'name'  => 'category.id',
                'title' => trans('cms::article.datatable.columns.category'),
                'width' => '100px',
            ],
            [
                'data'       => 'author',
                'title'      => trans('cms::article.datatable.columns.author'),
                'searchable' => false,
                'orderable'  => false,
            ],
            [
                'data'  => 'created_at',
                'name'  => 'articles.created_at',
                'title' => trans('cms::article.datatable.columns.created_at'),
                'width' => '90px',
            ],
            [
                'data'  => 'authenticated',
                'name'  => 'articles.authenticated',
                'width' => '20px',
                'title' => '<i class="fa fa-key" data-toggle="tooltip" data-title="' . trans('cms::article.datatable.columns.authenticated') . '"></i>',
            ],
            [
                'data'  => 'is_page',
                'name'  => 'articles.is_page',
                'title' => trans('cms::article.datatable.columns.is_page'),
                'width' => '20px',
            ],
            [
                'data'  => 'hits',
                'name'  => 'articles.hits',
                'width' => '20px',
                'title' => 'Hits',
            ],
            [
                'data'  => 'id',
                'name'  => 'articles.id',
                'title' => trans('cms::article.datatable.columns.id'),
                'width' => '10px',
            ],
        ];
    }
533071
protected function _getIdentColNames()
    {
        $aColNames = $this->_getColNames();
        $aCols = [];
        foreach ($aColNames as $iKey => $aCol) {
            // ident ?
            if ($aCol[4]) {
                $aCols[$iKey] = $aCol;
            }
        }

        return $aCols;
    }
798449
public function getColumns()
    {
        if (!$this->columns && $this->length()) {
            if ($this->first() instanceof DataInterface) {
                $this->columns = array_keys($this->first()->toArray());
            } elseif (is_array($this->first())) {
                $this->columns = array_keys($this->first());
            }
        }

        return $this->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;
    }
161970
public String[] getColumnNames() {
		Set<String> attrNameSet = getColumns().keySet();
		return attrNameSet.toArray(new String[attrNameSet.size()]);
	}
514076
public function getLabels() {
        $labels = array();
        foreach ($this->cols as $col) {
            $labels[] = $col->getLabel();
        }
        return $labels;
    }
151180
protected function getColumns(): array
    {
        $link = config('cortex.foundation.route.locale_prefix')
            ? '"<a href=\""+routes.route(\'adminarea.contacts.edit\', {contact: full.id, locale: \''.$this->request->segment(1).'\'})+"\">"+data+"</a>"'
            : '"<a href=\""+routes.route(\'adminarea.contacts.edit\', {contact: full.id})+"\">"+data+"</a>"';

        return [
            'given_name' => ['title' => trans('cortex/contacts::common.given_name'), 'render' => $link, 'responsivePriority' => 0],
            'family_name' => ['title' => trans('cortex/contacts::common.family_name')],
            'email' => ['title' => trans('cortex/contacts::common.email')],
            'phone' => ['title' => trans('cortex/contacts::common.phone')],
            'country_code' => ['title' => trans('cortex/contacts::common.country'), 'render' => 'full.country_emoji+" "+data'],
            'language_code' => ['title' => trans('cortex/contacts::common.language'), 'visible' => false],
            'source' => ['title' => trans('cortex/contacts::common.source'), 'visible' => false],
            'method' => ['title' => trans('cortex/contacts::common.method'), 'visible' => false],
            'created_at' => ['title' => trans('cortex/contacts::common.created_at'), 'render' => "moment(data).format('YYYY-MM-DD, hh:mm:ss A')"],
            'updated_at' => ['title' => trans('cortex/contacts::common.updated_at'), 'render' => "moment(data).format('YYYY-MM-DD, hh:mm:ss A')"],
        ];
    }
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()];
    }
192317
private function getColumns()
    {
        $table = $this->table->connect($this->database, Inflector::tabilize($this->tableName));

        return $table->getColumns();
    }
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;
    }
648928
public function getColumns(\ReflectionClass $reflectionClass)
    {
        if ($this->isProduction()) {
            $this->grid->getColumn()->getFields();
        }

        $properties = $reflectionClass->getProperties(\ReflectionProperty::IS_PRIVATE | \ReflectionProperty::IS_PROTECTED);
        foreach ($properties as $property) {
            $propertyAnnotations = $this->extractorFactory->extract($property, Extractor::PROPERTY_ANNOTATION);
            foreach ($propertyAnnotations as $annotation) {
                if ($annotation instanceof Column) {
                    $fields[] = $property->getName();
                }
            }
        }

        return !empty($fields) ? $fields : $this->grid->getColumn()->getFields();
    }
1334930
public function getTableColumns(): array
    {
        $columns = [
            'country_id' => $this->headerText(trans('HCRegion::regions_city.country_id')),
            'translation.label' => $this->headerText(trans('HCRegion::regions_city.label')),
            'visible' => $this->headerCheckBox(trans('HCRegion::regions_city.visible')),
        ];

        return $columns;
    }
387342
public function getPropertiesNames() {
		$propertiesList = [];
		
		foreach($this->_data as $item) {
			$propertiesList += array_keys($item);
		}
		
		return $propertiesList;
	}
1143257
private function compileColumnNames()
    {
        $columns = [];
        foreach($this->columnConfiguration as $column) {
            $columns[] = $column->getName();
        }

        return $columns;
    }