You are here

public function PackageTypeManager::__construct in Commerce Shipping 8.2

Constructs a new PackageTypeManager object.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

Overrides DefaultPluginManager::__construct

File

src/PackageTypeManager.php, line 47

Class

PackageTypeManager
Manages discovery and instantiation of package type plugins.

Namespace

Drupal\commerce_shipping

Code

public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend) {
  $this->moduleHandler = $module_handler;
  $this
    ->setCacheBackend($cache_backend, 'commerce_package_type_plugins');
}