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->getInstalledContentPlugins();
foreach ($plugins->getConfiguration() as $key => $plugin) {
// Cut key here.
}