- Issue created by @liquidcms
- π¨π¦Canada liquidcms
just had to change the getPlugins method:
$plugins = $group->getGroupType()->getInstalledPlugins(); foreach ($plugins as $plugin_id => $plugin) { if (str_replace($group_type . ':', '', $plugin->getConfiguration()['id']) == $entity->bundle()) { $group->addRelationship($entity, $plugin->getConfiguration()['id']); $company = $group->get('label')->getString(); \Drupal::messenger()->addMessage(t('%content added to %company: %company', [ '%content' => $entity->getTitle(), '%company' => $company]), 'notice'); } }
although i am guessing it isn't necessary to loop through all the plugins to do this.