public function OrderStoreResolver::resolve in Commerce Core 8.2
Resolves the store.
Return value
\Drupal\commerce_store\Entity\StoreInterface|null The store, if resolved. Otherwise NULL, indicating that the next resolver in the chain should be called.
Overrides StoreResolverInterface::resolve
File
- modules/
order/ src/ Resolver/ OrderStoreResolver.php, line 37
Class
- OrderStoreResolver
- Returns the order's store, when an order is present in the URL.
Namespace
Drupal\commerce_order\ResolverCode
public function resolve() {
$order = $this->routeMatch
->getParameter('commerce_order');
if ($order instanceof OrderInterface) {
return $order
->getStore();
}
return NULL;
}