protected static function LeafletDefaultWidget::getLeafletMaps in Leaflet 8
Same name and namespace in other branches
- 2.1.x src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::getLeafletMaps()
- 2.0.x src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::getLeafletMaps()
Get maps available for use with Leaflet.
2 calls to LeafletDefaultWidget::getLeafletMaps()
- LeafletDefaultWidget::defaultSettings in src/
Plugin/ Field/ FieldWidget/ LeafletDefaultWidget.php - Defines the default settings for this plugin.
- LeafletDefaultWidget::settingsForm in src/
Plugin/ Field/ FieldWidget/ LeafletDefaultWidget.php - Returns a form to configure settings for the widget.
File
- src/
Plugin/ Field/ FieldWidget/ LeafletDefaultWidget.php, line 57
Class
- LeafletDefaultWidget
- Plugin implementation of the "leaflet_widget" widget.
Namespace
Drupal\leaflet\Plugin\Field\FieldWidgetCode
protected static function getLeafletMaps() {
$options = [];
foreach (leaflet_map_get_info() as $key => $map) {
$options[$key] = $map['label'];
}
return $options;
}