You are here

public function GeocoderProvider::setPlugin in Geocoder 8.3

Sets the provider plugin.

Parameters

string $plugin: The machine name of the Geocoder provider plugin.

Return value

\Drupal\geocoder\GeocoderProviderInterface The entity, for chaining.

Overrides GeocoderProviderInterface::setPlugin

File

src/Entity/GeocoderProvider.php, line 125

Class

GeocoderProvider
Defines the Geocoder provider entity type.

Namespace

Drupal\geocoder\Entity

Code

public function setPlugin(string $plugin_id) : GeocoderProviderInterface {
  $this->plugin = $plugin_id;
  $this
    ->getPluginCollection()
    ->addInstanceId($plugin_id);
  return $this;
}