You are here

public function LocalStockTransactionEvent::getTransactionLocation in Commerce Stock 8

Get the stock_location for this transaction.

Return value

\Drupal\commerce_stock\StockLocationInterface The stock location.

File

modules/local_storage/src/Event/LocalStockTransactionEvent.php, line 53

Class

LocalStockTransactionEvent
Defines the stock location event.

Namespace

Drupal\commerce_stock_local\Event

Code

public function getTransactionLocation() {
  $locationId = $this->stockTransaction['location_id'];
  return $this->entityTypeManager
    ->getStorage('commerce_stock_location')
    ->load($locationId);
}