Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $node = Drupal::entityTypeManager()->getStorage('node')->load(123);
- if ($node->getType() == 'application') {
- return $node;
- } else {
- return false;
- }
- $nids = Drupal::entityQuery('node')
- ->condition('type', 'application')
- ->condition('nid', 123)
- ->execute();
- // followed by entityTypeManager()->getStorage('node') etc.
- $node = Drupal::entityTypeManager()->getStorage('node')->load(123);
- if ($node instanceof DrupalnodeEntityNode && $node->getType() == 'application') {
- }
Add Comment
Please, Sign In to add comment