You are here

protected function ActivityOverviewBlock::getGroupsCount in Open Social 8.4

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  2. 8 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  3. 8.2 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  4. 8.3 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  5. 8.5 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  6. 8.6 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  7. 8.7 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  8. 8.8 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  9. 10.3.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  10. 10.0.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  11. 10.1.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()
  12. 10.2.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getGroupsCount()

Get total count of groups.

1 call to ActivityOverviewBlock::getGroupsCount()
ActivityOverviewBlock::build in modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php
Builds and returns the renderable array for this block plugin.

File

modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php, line 304

Class

ActivityOverviewBlock
Provides a 'ActivityOverviewBlock' block.

Namespace

Drupal\social_landing_page\Plugin\Block

Code

protected function getGroupsCount() {

  // There is no unpublished option for groups.
  $query = $this->connection
    ->select('groups', 'g');
  $query
    ->addExpression('COUNT(*)');
  return $query
    ->execute()
    ->fetchField();
}