You are here

public function Order::setStore in Commerce Core 8.2

Sets the store.

Parameters

\Drupal\commerce_store\Entity\StoreInterface $store: The store entity.

Return value

$this

Overrides EntityStoreInterface::setStore

File

modules/order/src/Entity/Order.php, line 140

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function setStore(StoreInterface $store) {
  $this
    ->set('store_id', $store
    ->id());
  return $this;
}