public function Product::getStoreIds in Commerce Core 8.2
Gets the store IDs.
Return value
int[] The store IDs.
Overrides EntityStoresInterface::getStoreIds
File
- modules/
product/ src/ Entity/ Product.php, line 144
Class
- Product
- Defines the product entity class.
Namespace
Drupal\commerce_product\EntityCode
public function getStoreIds() {
$store_ids = [];
foreach ($this
->get('stores') as $store_item) {
$store_ids[] = $store_item->target_id;
}
return $store_ids;
}