D8 - How to Get Current node object in content view/edit page

$current_node = \Drupal::routeMatch()->getParameter('node');

Comments

Popular posts from this blog

New Object-Oriented Features in php 5