You are here

protected function MapThemerBase::buildTableHeader in Geofield Map 8.2

Returns Default Table Header.

Parameters

array $table_settings: The Table base settings..

Return value

array The Default Table Header render array.

6 calls to MapThemerBase::buildTableHeader()
EntityTypeThemer::buildMapThemerElement in src/Plugin/GeofieldMapThemer/EntityTypeThemer.php
Provides a Map Themer Options Element.
EntityTypeThemerUrl::buildMapThemerElement in src/Plugin/GeofieldMapThemer/EntityTypeThemerUrl.php
Provides a Map Themer Options Element.
ListFieldThemer::buildMapThemerElement in src/Plugin/GeofieldMapThemer/ListFieldThemer.php
Provides a Map Themer Options Element.
ListFieldThemerUrl::buildMapThemerElement in src/Plugin/GeofieldMapThemer/ListFieldThemerUrl.php
Provides a Map Themer Options Element.
TaxonomyTermThemer::buildMapThemerElement in src/Plugin/GeofieldMapThemer/TaxonomyTermThemer.php
Provides a Map Themer Options Element.

... See full list

File

src/MapThemerBase.php, line 67

Class

MapThemerBase
A base class for MapThemer plugins.

Namespace

Drupal\geofield_map

Code

protected function buildTableHeader(array $table_settings) {
  return [
    '#type' => 'table',
    '#header' => [
      $table_settings['header']['label'],
      $this
        ->t('Weight'),
      $table_settings['header']['label_alias'],
      $table_settings['header']['marker_icon'],
      $table_settings['header']['image_style'],
      $this
        ->t('Hide from Legend'),
    ],
    '#tabledrag' => [
      [
        'action' => 'order',
        'relationship' => 'sibling',
        'group' => $table_settings['tabledrag_group'],
      ],
    ],
    '#caption' => $this->renderer
      ->renderPlain($table_settings['caption']),
  ];
}