interface StockLocationStorageInterface in Commerce Stock 8
Defines the interface for local stock location storage.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\Core\Entity\Sql\SqlEntityStorageInterface
- interface \Drupal\commerce_stock_local\StockLocationStorageInterface
- interface \Drupal\Core\Entity\Sql\SqlEntityStorageInterface
Expanded class hierarchy of StockLocationStorageInterface
All classes that implement StockLocationStorageInterface
File
- modules/
local_storage/ src/ StockLocationStorageInterface.php, line 12
Namespace
Drupal\commerce_stock_localView source
interface StockLocationStorageInterface extends SqlEntityStorageInterface {
/**
* Loads the enabled locations for the given Purchasable Entity.
*
* Enabled variations are active stock locations that have
* been filtered through the FILTER_STOCK_LOCATIONS event.
*
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity.
*
* @return \Drupal\commerce_stock_local\Entity\StockLocation[]
* The enabled stock locations.
*/
public function loadEnabled(PurchasableEntityInterface $entity);
/**
* Loads the relevant locations for the given Purchasable Entity and context.
*
* Relevant locations are active and available for fulfillment for the product
* and context provided.
*
* @param \Drupal\commerce\Context $context
* The context.
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity.
*
* @return \Drupal\commerce_stock_local\Entity\StockLocation[]
* The enabled stock locations.
*/
public function loadInContext(Context $context, PurchasableEntityInterface $entity);
/**
* Get the transaction location for the given product and context.
*
* @param \Drupal\commerce\Context $context
* The context.
* @param \Drupal\commerce\PurchasableEntityInterface $entity
* The purchasable entity.
*
* @return \Drupal\commerce_stock_local\Entity\StockLocation[]
* The enabled stock locations.
*/
public function getTransactionLocation(Context $context, PurchasableEntityInterface $entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityStorageInterface:: |
public | function | Constructs a new entity object, without permanently saving it. | 1 |
EntityStorageInterface:: |
public | function | Deletes permanently saved entities. | 1 |
EntityStorageInterface:: |
public | function | Delete a specific entity revision. | 4 |
EntityStorageInterface:: |
constant | Load the most recent version of an entity's field data. | ||
EntityStorageInterface:: |
constant | Load the version of an entity's field data specified in the entity. | ||
EntityStorageInterface:: |
public | function | Gets an aggregated query instance. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type definition. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type ID. | 1 |
EntityStorageInterface:: |
public | function | Gets an entity query instance. | 1 |
EntityStorageInterface:: |
public | function | Determines if the storage contains any data. | 1 |
EntityStorageInterface:: |
public | function | Loads one entity. | 1 |
EntityStorageInterface:: |
public | function | Load entities by their property values. | 1 |
EntityStorageInterface:: |
public | function | Loads one or more entities. | 1 |
EntityStorageInterface:: |
public | function | Load a specific entity revision. | 4 |
EntityStorageInterface:: |
public | function | Loads an unchanged entity from the database. | 1 |
EntityStorageInterface:: |
public | function | Resets the internal, static entity cache. | 1 |
EntityStorageInterface:: |
public | function | Restores a previously saved entity. | 1 |
EntityStorageInterface:: |
public | function | Saves the entity permanently. | 1 |
SqlEntityStorageInterface:: |
public | function | Gets a table mapping for the entity's SQL tables. | 1 |
StockLocationStorageInterface:: |
public | function | Get the transaction location for the given product and context. | 1 |
StockLocationStorageInterface:: |
public | function | Loads the enabled locations for the given Purchasable Entity. | 1 |
StockLocationStorageInterface:: |
public | function | Loads the relevant locations for the given Purchasable Entity and context. | 1 |