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