protected function MapThemerBase::defaultLegendHeader in Geofield Map 8.2
Returns the default Legend Header.
Parameters
array $configuration: The Legend configuration.
Return value
array The DefaultLegendIcon render array.
7 calls to MapThemerBase::defaultLegendHeader()
- CustomIconThemer::getLegend in src/
Plugin/ GeofieldMapThemer/ CustomIconThemer.php - Generate the Legend render array.
- EntityTypeThemer::getLegend in src/
Plugin/ GeofieldMapThemer/ EntityTypeThemer.php - Generate the Legend render array.
- EntityTypeThemerUrl::getLegend in src/
Plugin/ GeofieldMapThemer/ EntityTypeThemerUrl.php - Generate the Legend render array.
- ListFieldThemer::getLegend in src/
Plugin/ GeofieldMapThemer/ ListFieldThemer.php - Generate the Legend render array.
- ListFieldThemerUrl::getLegend in src/
Plugin/ GeofieldMapThemer/ ListFieldThemerUrl.php - Generate the Legend render array.
File
- src/
MapThemerBase.php, line 190
Class
- MapThemerBase
- A base class for MapThemer plugins.
Namespace
Drupal\geofield_mapCode
protected function defaultLegendHeader(array $configuration) {
$legend_default_settings = $this
->defaultSettings('legend');
return [
'#type' => 'container',
'#attributes' => [
'class' => [
'geofield-map-legend',
$legend_default_settings['class'],
],
],
'table' => [
'#type' => 'table',
'#caption' => isset($configuration['legend_caption']) ? $configuration['legend_caption'] : '',
'#header' => [
isset($configuration['values_label']) ? $configuration['values_label'] : '',
isset($configuration['markers_label']) ? $configuration['markers_label'] : '',
],
],
];
}