You are here

public function ShippingMethod::getStoreIds in Commerce Shipping 8.2

Gets the store IDs.

Return value

int[] The store IDs.

Overrides EntityStoresInterface::getStoreIds

File

src/Entity/ShippingMethod.php, line 100

Class

ShippingMethod
Defines the shipping method entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

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