-
Notifications
You must be signed in to change notification settings - Fork 132
Remove getAllGroupBundles and replace with getGroupMap #402
Remove getAllGroupBundles and replace with getGroupMap #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just one small remark. Thanks!
@@ -68,13 +68,13 @@ protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') | |||
$definition = \Drupal::entityTypeManager()->getDefinition($target_type); | |||
|
|||
if ($bundle_key = $definition->getKey('bundle')) { | |||
$bundles = Og::groupTypeManager()->getAllGroupBundles($target_type); | |||
$map = Og::groupTypeManager()->getGroupMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can replace this with a call to GroupTypeManager::getGroupsForEntityType()
, this can be passed the $target_type
parameter directly, so we don't need to retrieve the full map and can save some memory.
Oh, something went wrong in the merge here, the |
Now we have some failures due to We'll get there eventually 😬 |
#372