Guest User

Untitled

a guest
May 24th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $node = Drupal::entityTypeManager()->getStorage('node')->load(123);
  2.  
  3. if ($node->getType() == 'application') {
  4. return $node;
  5. } else {
  6. return false;
  7. }
  8.  
  9. $nids = Drupal::entityQuery('node')
  10. ->condition('type', 'application')
  11. ->condition('nid', 123)
  12. ->execute();
  13.  
  14. // followed by entityTypeManager()->getStorage('node') etc.
  15.  
  16. $node = Drupal::entityTypeManager()->getStorage('node')->load(123);
  17. if ($node instanceof DrupalnodeEntityNode && $node->getType() == 'application') {
  18.  
  19. }
Add Comment
Please, Sign In to add comment