public function GroupStatistics::getGroupMemberCount in Open Social 8.9
Same name and namespace in other branches
- 8.8 modules/social_features/social_group/src/GroupStatistics.php \Drupal\social_group\GroupStatistics::getGroupMemberCount()
- 10.3.x modules/social_features/social_group/src/GroupStatistics.php \Drupal\social_group\GroupStatistics::getGroupMemberCount()
- 10.0.x modules/social_features/social_group/src/GroupStatistics.php \Drupal\social_group\GroupStatistics::getGroupMemberCount()
- 10.1.x modules/social_features/social_group/src/GroupStatistics.php \Drupal\social_group\GroupStatistics::getGroupMemberCount()
- 10.2.x modules/social_features/social_group/src/GroupStatistics.php \Drupal\social_group\GroupStatistics::getGroupMemberCount()
Get group members count.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group entity.
Return value
int The number of members.
File
- modules/
social_features/ social_group/ src/ GroupStatistics.php, line 41
Class
- GroupStatistics
- Class GroupStatistics.
Namespace
Drupal\social_groupCode
public function getGroupMemberCount(GroupInterface $group) {
return $this
->count($group, 'group_membership');
}