You are here

public function EntityTestWithStore::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/number_pattern/tests/modules/commerce_number_pattern_test/src/Entity/EntityTestWithStore.php, line 45

Class

EntityTestWithStore
Defines a test entity class with store.

Namespace

Drupal\commerce_number_pattern_test\Entity

Code

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