Skip to main content

Main navigation

Menu

Close
  • Home
  • Modules
  • System
  • Theming
  • Search blog
  • Contact
Menu

Get current order entity with routeMatch

Wed, 02/24/2021

One more way to get current  order is to use routeMatch like

  $route_name = \Drupal::routeMatch()->getParameter('commerce_order');

 

Drupal 8
Drupal 9
Commerce

Finding The Way Home @ 2011 - 2020

Powered by Drupal