📌  相关文章
📜  drupal 8 获取页面节点 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:14.286000             🧑  作者: Mango

代码示例1
// Get page node.
$node = \Drupal::routeMatch()->getParameter('node');

// Get page entity.
$params = \Drupal::routeMatch()->getParameters()->all();
$entity = reset($params);