You are here

public static function LeafletDefaultWidget::create in Leaflet 2.1.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::create()
  2. 2.0.x src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php \Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget::create()

File

src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php, line 135

Class

LeafletDefaultWidget
Plugin implementation of the "leaflet_widget" widget.

Namespace

Drupal\leaflet\Plugin\Field\FieldWidget

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['third_party_settings'], $container
    ->get('geofield.geophp'), $container
    ->get('geofield.wkt_generator'), $container
    ->get('plugin.manager.geofield_backend'), $container
    ->get('leaflet.service'), $container
    ->get('module_handler'), $container
    ->get('link_generator'), $container
    ->get('token'));
}