You are here

public function ManualOriginDefault::__construct in Geofield 8

Constructs a ManualOriginDefault object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides PluginBase::__construct

File

src/Plugin/GeofieldProximitySource/ManualOriginDefault.php, line 34

Class

ManualOriginDefault
Defines 'Geofield Manual Origin' plugin.

Namespace

Drupal\geofield\Plugin\GeofieldProximitySource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->origin['lat'] = isset($configuration['origin']) && is_numeric($configuration['origin']['lat']) ? $configuration['origin']['lat'] : '';
  $this->origin['lon'] = isset($configuration['origin']) && is_numeric($configuration['origin']['lon']) ? $configuration['origin']['lon'] : '';
}