protected function getContentEntityTypes() {
    $options = [];
    foreach ($this->entityTypeManager->getDefinitions() as $entity_type) {
      if ($entity_type instanceof ContentEntityTypeInterface) {
        $options[$entity_type->id()] = $entity_type->getLabel();
      }
    }
    return $options;
  }
protected function getContentEntityTypes() {
    $options = [];
    foreach ($this->entityTypeManager->getDefinitions() as $entity_type) {
      if ($entity_type instanceof ContentEntityTypeInterface) {
        $options[$entity_type->id()] = $entity_type->getLabel();
      }
    }
    return $options;
  }
protected function getContentEntityTypes ( ) { $ options = [ ] ; foreach ( $ this -> entityTypeManager -> getDefinitions ( ) as $ entity_type ) { if ( $ entity_type instanceof ContentEntityTypeInterface ) { $ options [ $ entity_type -> id ( ) ] = $ entity_type -> getLabel ( ) ; } } return $ options ; }
Get content entity types keyed by id.

@return array
Returns array of content entity types.
Get content entity types keyed by id .