src/Contao/View/Contao2BackendView/ActionHandler/AbstractListShowAllHandler.php
private function getTableHead(EnvironmentInterface $environment)
    {
        $tableHead  = [];
        $definition = $environment->getDataDefinition();
        $properties = $definition->getPropertiesDefinition();
        $formatter  = $this->getViewSection($definition)->getListingConfig()->getLabelFormatter($definition->getName());
        $sorting    = ViewHelpers::getCurrentSorting($environment);
        $columns    = $this->getSortingColumns($sorting);
        foreach ($formatter->getPropertyNames() as $field) {
            // Skip unknown properties. This may happen if the property is not defined for editing but only listing.
            if (!$properties->hasProperty($field)) {
                continue;
            }

            $tableHead[] = [
                'class'   => 'tl_folder_tlist col_' . $field . (\in_array($field, $columns) ? ' ordered_by' : ''),
                'content' => $properties->getProperty($field)->getLabel()
            ];
        }

        $tableHead[] = [
            'class'   => 'tl_folder_tlist tl_right_nowrap',
            'content' => $this->renderPasteTopButton($environment, $sorting) ?: '&nbsp;'
        ];

        return $tableHead;
    }
private function getTableHead(EnvironmentInterface $environment)
    {
        $tableHead  = [];
        $definition = $environment->getDataDefinition();
        $properties = $definition->getPropertiesDefinition();
        $formatter  = $this->getViewSection($definition)->getListingConfig()->getLabelFormatter($definition->getName());
        $sorting    = ViewHelpers::getCurrentSorting($environment);
        $columns    = $this->getSortingColumns($sorting);
        foreach ($formatter->getPropertyNames() as $field) {
            // Skip unknown properties. This may happen if the property is not defined for editing but only listing.
            if (!$properties->hasProperty($field)) {
                continue;
            }

            $tableHead[] = [
                'class'   => 'tl_folder_tlist col_' . $field . (\in_array($field, $columns) ? ' ordered_by' : ''),
                'content' => $properties->getProperty($field)->getLabel()
            ];
        }

        $tableHead[] = [
            'class'   => 'tl_folder_tlist tl_right_nowrap',
            'content' => $this->renderPasteTopButton($environment, $sorting) ?: '&nbsp;'
        ];

        return $tableHead;
    }
private function getTableHead ( EnvironmentInterface $ environment ) { $ tableHead = [ ] ; $ definition = $ environment -> getDataDefinition ( ) ; $ properties = $ definition -> getPropertiesDefinition ( ) ; $ formatter = $ this -> getViewSection ( $ definition ) -> getListingConfig ( ) -> getLabelFormatter ( $ definition -> getName ( ) ) ; $ sorting = ViewHelpers :: getCurrentSorting ( $ environment ) ; $ columns = $ this -> getSortingColumns ( $ sorting ) ; foreach ( $ formatter -> getPropertyNames ( ) as $ field ) { // Skip unknown properties. This may happen if the property is not defined for editing but only listing. if ( ! $ properties -> hasProperty ( $ field ) ) { continue ; } $ tableHead [ ] = [ 'class' => 'tl_folder_tlist col_' . $ field . ( \ in_array ( $ field , $ columns ) ? ' ordered_by' : '' ) , 'content' => $ properties -> getProperty ( $ field ) -> getLabel ( ) ] ; } $ tableHead [ ] = [ 'class' => 'tl_folder_tlist tl_right_nowrap' , 'content' => $ this -> renderPasteTopButton ( $ environment , $ sorting ) ? : '&nbsp;' ] ; return $ tableHead ; }
Get the table headings.

@param EnvironmentInterface $environment The environment.

@return array
Get the table headings .