Answers for "drupal 8 get node"

1

drupal 8 get page node

// Get page node.
$node = \Drupal::routeMatch()->getParameter('node');

// Get page entity.
$params = \Drupal::routeMatch()->getParameters()->all();
$entity = reset($params);
Posted by: Guest on September-04-2020
0

drupal 8 get node

$node = \Drupal::routeMatch()->getParameter('node');
Posted by: Guest on March-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language