2 * Implements hook_node_links_alter().
4 function {{ machine_name }}_node_links_alter(array &$links, NodeInterface $entity, array &$context) {
6 '#theme' => 'links__node__mymodule',
7 '#attributes' => ['class' => ['links', 'inline']],
10 'title' => t('Report'),
11 'url' => Url::fromRoute('node_test.report', ['node' => $entity->id()], ['query' => ['token' => \Drupal::getContainer()->get('csrf_token')->get("node/{$entity->id()}/report")]]),