porposer une opération page title #2436

This commit is contained in:
2023-11-27 12:20:36 +01:00
parent bdf05a1d65
commit 09b691fd50
+12
View File
@@ -78,4 +78,16 @@ function reha_preprocess_block(&$variables) {
]
);
}
if ($variables['plugin_id'] === "page_title_block") {
if (\Drupal::routeMatch()->getRouteName() === 'node.add') {
$node_type = \Drupal::routeMatch()->getParameter('node_type');
if ($node_type->id() === 'operation') {
$variables['content'] = [
'#type' => 'page_title',
'#title' => 'Proposer une opération'
];
}
}
}
}