public function ControlCustomElementBase::alterMap in Geolocation Field 8.3
Same name in this branch
- 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/ControlCustomElementBase.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\ControlCustomElementBase::alterMap()
- 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/ControlCustomElementBase.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\ControlCustomElementBase::alterMap()
Same name and namespace in other branches
- 8.2 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/ControlCustomElementBase.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\ControlCustomElementBase::alterMap()
Alter render array.
Parameters
array $render_array: Render array.
array $feature_settings: The current feature settings.
array $context: Context like field formatter, field widget or view.
Return value
array Render array.
Overrides ControlElementBase::alterMap
4 calls to ControlCustomElementBase::alterMap()
- LeafletControlGeocoder::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlGeocoder.php - Alter render array.
- LeafletControlLayer::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlLayer.php - Alter render array.
- LeafletControlLocate::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlLocate.php - Alter render array.
- LeafletControlRecenter::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlRecenter.php - Alter render array.
4 methods override ControlCustomElementBase::alterMap()
- LeafletControlGeocoder::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlGeocoder.php - Alter render array.
- LeafletControlLayer::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlLayer.php - Alter render array.
- LeafletControlLocate::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlLocate.php - Alter render array.
- LeafletControlRecenter::alterMap in modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletControlRecenter.php - Alter render array.
File
- modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ ControlCustomElementBase.php, line 13
Class
- ControlCustomElementBase
- Class ControlMapFeatureBase.
Namespace
Drupal\geolocation_leaflet\Plugin\geolocation\MapFeatureCode
public function alterMap(array $render_array, array $feature_settings, array $context = []) {
$render_array = parent::alterMap($render_array, $feature_settings, $context);
$render_array['#controls'][$this->pluginId] = [
'#type' => 'container',
'#attributes' => [
'class' => [
'geolocation-map-control',
$this
->getPluginId(),
],
'data-control-position' => empty($feature_settings['position']) ? '' : $feature_settings['position'],
],
];
return $render_array;
}