Commit 703dca11 authored by bojanz's avatar bojanz

Remove the unused ShippingMethodPluginCollection.

parent f0ecfc9b
namespace Drupal\commerce_shipping;
use Drupal\Component\Plugin\Exception\PluginException;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection;
* A collection of shipping method plugins.
class ShippingMethodPluginCollection extends DefaultSingleLazyPluginCollection {
* The shipping method entity ID this plugin collection belongs to.
* @var string
protected $entityId;
* Constructs a new ShippingMethodPluginCollection object.
* @param \Drupal\Component\Plugin\PluginManagerInterface $manager
* The manager to be used for instantiating plugins.
* @param string $instance_id
* The ID of the plugin instance.
* @param array $configuration
* An array of configuration.
* @param string $entity_id
* The shipping_method entity ID this plugin collection belongs to.
public function __construct(PluginManagerInterface $manager, $instance_id, array $configuration, $entity_id) {
parent::__construct($manager, $instance_id, $configuration);
$this->entityId = $entity_id;
* {@inheritdoc}
protected function initializePlugin($instance_id) {
if (!$instance_id) {
throw new PluginException("The shipping_method '{$this->entityId}' did not specify a plugin.");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment