You are here

public static function LocalStockService::create in Commerce Stock 8

Creates a new Local stock service.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The DI container.

Return value

static

1 call to LocalStockService::create()
LocalStockServiceTest::testLocalStockService in modules/local_storage/tests/src/Kernel/LocalStockServiceTest.php
Test the local stock service.

File

modules/local_storage/src/LocalStockService.php, line 61

Class

LocalStockService
The Local stock Service class.

Namespace

Drupal\commerce_stock_local

Code

public static function create(ContainerInterface $container) {
  return new static($container
    ->get('commerce_stock.local_stock_checker'), $container
    ->get('commerce_stock.local_stock_updater'), $container
    ->get('commerce_stock.local_stock_service_config'));
}