You are here

protected function NumberPattern::getPluginCollection in Commerce Core 8.2

Gets the plugin collection that holds the number pattern plugin.

Ensures the plugin collection is initialized before returning it.

Return value

\Drupal\commerce\CommerceSinglePluginCollection The plugin collection.

1 call to NumberPattern::getPluginCollection()
NumberPattern::getPluginCollections in modules/number_pattern/src/Entity/NumberPattern.php
Gets the plugin collections used by this object.

File

modules/number_pattern/src/Entity/NumberPattern.php, line 194

Class

NumberPattern
Defines the number pattern entity class.

Namespace

Drupal\commerce_number_pattern\Entity

Code

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