You are here

protected function ExchangeRates::getPluginCollection in Commerce Exchanger 8

Gets the plugin collection that holds the exchange provider plugin.

Ensures the plugin collection is initialized before returning it.

Return value

\Drupal\commerce\CommerceSinglePluginCollection The plugin collection.

1 call to ExchangeRates::getPluginCollection()
ExchangeRates::getPluginCollections in src/Entity/ExchangeRates.php

File

src/Entity/ExchangeRates.php, line 190

Class

ExchangeRates
Defines the Exchange rates entity.

Namespace

Drupal\commerce_exchanger\Entity

Code

protected function getPluginCollection() {
  if (!$this->pluginCollection) {
    $plugin_manager = \Drupal::service('plugin.manager.commerce_exchanger_provider');
    $this->pluginCollection = new CommerceSinglePluginCollection($plugin_manager, $this->plugin, $this->configuration, $this->id);
  }
  return $this->pluginCollection;
}