protected function ActivityOverviewBlock::getEventsCount in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.2 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.3 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.5 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.6 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.7 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 8.8 modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 10.3.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 10.0.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 10.1.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
- 10.2.x modules/social_features/social_landing_page/src/Plugin/Block/ActivityOverviewBlock.php \Drupal\social_landing_page\Plugin\Block\ActivityOverviewBlock::getEventsCount()
Get total count of events.
1 call to ActivityOverviewBlock::getEventsCount()
- 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 282
Class
- ActivityOverviewBlock
- Provides a 'ActivityOverviewBlock' block.
Namespace
Drupal\social_landing_page\Plugin\BlockCode
protected function getEventsCount() {
$query = $this->connection
->select('node_field_data', 'n');
$query
->addExpression('COUNT(*)');
$query
->condition('n.type', 'event');
$query
->condition('n.status', 1);
return $query
->execute()
->fetchField();
}