Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $links = array(
- '#theme' => 'links__node',
- '#pre_render' => array('drupal_pre_render_links'),
- '#attributes' => array('class' => array('links', 'inline')),
- );
- if (!$is_in_preview) {
- $entity = Node::load($node_entity_id)->getTranslation($langcode);
- $links['node'] = static::buildLinks($entity, $view_mode);
- // Allow other modules to alter the node links.
- $hook_context = array(
- 'view_mode' => $view_mode,
- 'langcode' => $langcode,
- );
- Drupal::moduleHandler()->alter('node_links', $links, $entity, $hook_context);
- }
- return $links;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement