Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /**
  2. * Implements hook_theme_suggestions_form_element_label().
  3. */
  4. function boots_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
  5. $node = \Drupal::routeMatch()->getParameter('node');
  6.  
  7. if ($node instanceof \Drupal\node\NodeInterface) {
  8. $type = $node->getType();
  9. if ($type == 'form') {
  10. $suggestions[] = $hook . '__' . $type;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement