You are here

public function Promotion::getStoreIds in Commerce Core 8.2

Gets the store IDs.

Return value

int[] The store IDs.

Overrides EntityStoresInterface::getStoreIds

1 call to Promotion::getStoreIds()
Promotion::available in modules/promotion/src/Entity/Promotion.php
Checks whether the promotion is available for the given order.

File

modules/promotion/src/Entity/Promotion.php, line 232

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

public function getStoreIds() {
  $store_ids = [];
  foreach ($this
    ->get('stores') as $field_item) {
    $store_ids[] = $field_item->target_id;
  }
  return $store_ids;
}