You are here

public function StockServiceManagerInterface::getService in Commerce Stock 8

Get a service relevant for the entity.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity (most likely a product variation entity).

Return value

\Drupal\commerce_stock\StockServiceInterface The appropriate stock service for the given purchasable entity.

1 method overrides StockServiceManagerInterface::getService()
StockServiceManager::getService in src/StockServiceManager.php
Get a service relevant for the entity.

File

src/StockServiceManagerInterface.php, line 29

Class

StockServiceManagerInterface
The stock service manager interface.

Namespace

Drupal\commerce_stock

Code

public function getService(PurchasableEntityInterface $entity);