You are here

public function Product::setStores in Commerce Core 8.2

Sets the stores.

Parameters

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

Return value

$this

Overrides EntityStoresInterface::setStores

File

modules/product/src/Entity/Product.php, line 136

Class

Product
Defines the product entity class.

Namespace

Drupal\commerce_product\Entity

Code

public function setStores(array $stores) {
  $this
    ->set('stores', $stores);
  return $this;
}