abstract class GeofieldBackendBase in Geofield 8
Defines a base class for geofield backends.
A complete sample plugin definition should be defined as in this example:
@GeofieldBackend(
id = "geofield_backend_default",
admin_label = @Translation("Default Backend")
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\geofield\Plugin\GeofieldBackendBase implements ContainerFactoryPluginInterface, GeofieldBackendPluginInterface
Expanded class hierarchy of GeofieldBackendBase
See also
\Drupal\geofield\Annotation\GeofieldBackend
\Drupal\geofield\Plugin\GeofieldBackendPluginInterface
\Drupal\geofield\Plugin\GeofieldBackendManager
2 files declare their use of GeofieldBackendBase
- GeofieldBackendDefault.php in src/
Plugin/ GeofieldBackend/ GeofieldBackendDefault.php - GeofieldBackendPostgis.php in src/
Plugin/ GeofieldBackend/ GeofieldBackendPostgis.php
File
- src/
Plugin/ GeofieldBackendBase.php, line 27
Namespace
Drupal\geofield\PluginView source
abstract class GeofieldBackendBase extends PluginBase implements GeofieldBackendPluginInterface, ContainerFactoryPluginInterface {
/**
* The geoPhpWrapper service.
*
* @var \Drupal\geofield\GeoPHP\GeoPHPInterface
*/
protected $geoPhpWrapper;
/**
* Constructs the GeofieldBackendDefault.
*
* @param array $configuration
* The configuration.
* @param string $plugin_id
* The plugin ID for the migration process to do.
* @param mixed $plugin_definition
* The configuration for the plugin.
* @param \Drupal\geofield\GeoPHP\GeoPHPInterface $geophp_wrapper
* The geoPhpWrapper.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, GeoPHPInterface $geophp_wrapper) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->geoPhpWrapper = $geophp_wrapper;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('geofield.geophp'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GeofieldBackendBase:: |
protected | property | The geoPhpWrapper service. | |
GeofieldBackendBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
GeofieldBackendBase:: |
public | function |
Constructs the GeofieldBackendDefault. Overrides PluginBase:: |
|
GeofieldBackendPluginInterface:: |
public | function | Saves the Geo value into the Specific Backend Format. | 2 |
GeofieldBackendPluginInterface:: |
public | function | Provides the specific database schema for the specific backend. | 2 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |