Get enabled content types machine name I'm trying to get the enabled content type machine names for a given group. 

I wrote the following code, but to get the machine name I should cut the strings to group_node:.

    /** @var \Drupal\group\Entity\GroupType $group */
    $group = GroupType::load($groupKey);
    $plugins = $group-&gt;getInstalledContentPlugins();
    foreach ($plugins-&gt;getConfiguration() as $key =&gt; $plugin) {
      // Cut key here.
    }
Okay, I don't know how I missed this.

/** @var \Drupal\group\Entity\GroupType $group */
$group = GroupType::load($groupKey);
$plugins = $group-&gt;getInstalledContentPlugins();
foreach ($plugins as $key =&gt; $plugin) {
  $bundle = $plugin-&gt;getEntityBundle();
}