public function StoreStorage::markAsDefault in Commerce Core 8.2
Marks the provided store as the default.
Parameters
\Drupal\commerce_store\Entity\StoreInterface $store: The new default store.
Overrides StoreStorageInterface::markAsDefault
Deprecated
in commerce:8.x-2.16 and is removed from commerce:3.x.
File
- modules/
store/ src/ StoreStorage.php, line 31
Class
- StoreStorage
- Defines the store storage.
Namespace
Drupal\commerce_storeCode
public function markAsDefault(StoreInterface $store) {
$store
->setDefault(TRUE);
$store
->save();
}