You are here

public function ProductBundle::getStores in Commerce Product Bundle 8

Gets the stores through which the purchasable entity is sold.

Return value

\Drupal\commerce_store\Entity\StoreInterface[] The stores.

Overrides PurchasableEntityInterface::getStores

File

src/Entity/ProductBundle.php, line 164

Class

ProductBundle
Defines the product bundle entity.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function getStores() {
  return $this
    ->get('stores')
    ->referencedEntities();
}