04 September
$node = \Drupal::routeMatch()->getParameter('node'); if ($node instanceof \Drupal\node\NodeInterface) { // You can get nid and anything else you need from the node object. $nid = $node->id(); }
© 2023.ZedAngle. All Rights Reserved.