To get node object using node parameters,$node = \Drupal::routeMatch()->getParameter('node');if (!$node) { return;}$title = $node->bundle(); Log in to post comments Category Node