How do I get an array of all entitytypes of a specific entity? Hey there what I'm trying to do is to get all entity type ids from my custom config entity.
To load them all.

Example give:

I have an entity 'foo' and I create a new 'foo' named 'bar1' and another 'bar2' and so on how do I get those ids programmatically?

Better question

How do I get all entity_type_ids(or bundles dunno don't found a good entity hirarchie doku yet :( ) of an entity for example all types of the node entity?
Do you mean "How do I get an array of all entities of a specific entity type?"

$ids = \Drupal::entityQuery($entity_type_id)-&gt;execute();


Because an entity can only be of one type, to get the id of the entity type:

$entity_type_id = $entity-&gt;getEntityTypeId();


Answer to the edited question: 

"How do I get an array of all bundle id's of a specific entity type?"

$bundles = \Drupal::entityManager()-&gt;getBundleInfo($entity_type_id);


Or all content types, which are bundles of the entity type node:

$content_types = \Drupal::entityManager()-&gt;getBundleInfo('node');


This function will be moved to it's own class before Drupal 9:

\Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo()


This is provided as a service:

$content_types = \Drupal::service('entity_type.bundle.info')-&gt;getBundleInfo('node');