You are here

public function DefaultStoreResolver::__construct in Commerce Core 8.2

Constructs a new DefaultStoreResolver object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

File

modules/store/src/Resolver/DefaultStoreResolver.php, line 25

Class

DefaultStoreResolver
Returns the default store, if known.

Namespace

Drupal\commerce_store\Resolver

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
  $this->storage = $entity_type_manager
    ->getStorage('commerce_store');
}