drupal get route current content type

57

$node = \Drupal::routeMatch()->getParameter('node');
$typeName = $node->bundle();
$typeLabel = $node->getTitle();

Comments

Submit
0 Comments