I would like to get all nodes that are of
my_custom_type type in Drupal 8.
I know I can get all the nodes (of any type) with
\Drupal\node\Entity\Node::loadMultiple() and the list of all types by
But how to get only the nodes of given node type?
I really don't want to use specialized module for it (if it's possible), just keep it as simple as possible. I will use the solution in my custom module.
And loading all the nodes with
\Drupal\node\Entity\Node::loadMultiple() and then check their type in
foreach would hit the performance too much.