I need to get all the names of the entity, my entity is called 'a_process'? How can I write such query in Drupal 8?
$nodes = entity_load_multiple('a_process', $name);
You can use the entity type manager to load entities of any type:
$entities = \Drupal::entityTypeManager()
->getStorage('a_process')
->loadMultiple();
foreach ($entities as $entity) {
// ...
}
If your code is in a container aware context, be sure to inject the entity manager as a service instead of referring to \Drupal
explicitly.
Of course if you always know the entity type up-front you can use the method on the entity class itself, eg
$entities = \Drupal\foo\Entity\AProcess::loadMultiple()
$entity->name->value
, for example, if your field is called name