You are here

public function EventType::count in Open Social 8.9

Same name and namespace in other branches
  1. 8 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  2. 8.2 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  3. 8.3 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  4. 8.4 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  5. 8.5 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  6. 8.6 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  7. 8.7 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  8. 8.8 modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  9. 10.3.x modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  10. 10.0.x modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  11. 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()
  12. 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/EventType.php \Drupal\social_demo\Plugin\DemoContent\EventType::count()

Returns quantity of created items.

Return value

int Returns quantity of created items.

Overrides DemoContent::count

File

modules/custom/social_demo/src/Plugin/DemoContent/EventType.php, line 35

Class

EventType
EventType Plugin for demo content.

Namespace

Drupal\social_demo\Plugin\DemoContent

Code

public function count() {

  // Check if event types are enabled.
  if (!\Drupal::moduleHandler()
    ->moduleExists('social_event_type')) {
    drush_log(dt('The social event type module is not enabled.'), LogLevel::WARNING);
    return FALSE;
  }
  return parent::count();
}