public function GeolocationMapWidgetBase::__construct in Geolocation Field 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/GeolocationMapWidgetBase.php \Drupal\geolocation\Plugin\Field\FieldWidget\GeolocationMapWidgetBase::__construct()
Constructs a WidgetBase object.
Parameters
string $plugin_id: The plugin_id for the widget.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.
array $settings: The widget settings.
array $third_party_settings: Any third party settings.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\geolocation\MapCenterManager $map_center_manager: Map center manager.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ GeolocationMapWidgetBase.php, line 76
Class
- GeolocationMapWidgetBase
- Map widget base.
Namespace
Drupal\geolocation\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityFieldManagerInterface $entity_field_manager, MapCenterManager $map_center_manager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->entityFieldManager = $entity_field_manager;
$this->mapCenterManager = $map_center_manager;
if (!empty(static::$mapProviderId)) {
$this->mapProvider = \Drupal::service('plugin.manager.geolocation.mapprovider')
->getMapProvider(static::$mapProviderId);
}
}