drupal 8 get all nodes of type

48

drupal 8 get all nodes of type -

$nids = \Drupal::entityQuery('node')->condition('type','my_custom_type')->execute();
$nodes =  \Drupal\node\Entity\Node::loadMultiple($nids);

Comments

Submit
0 Comments