You are here

public function CalendarEventStorage::hasBundleData in Opigno calendar event 8

Same name and namespace in other branches
  1. 3.x src/CalendarEventStorage.php \Drupal\opigno_calendar_event\CalendarEventStorage::hasBundleData()

Checks whether there is stored data for the specififed bundle.

Parameters

string $bundle_id: The bundle ID.

Return value

bool TRUE if there is stored data for the specified bundle, FALSE otherwise.

File

src/CalendarEventStorage.php, line 21

Class

CalendarEventStorage
Storage class for calendar events.

Namespace

Drupal\opigno_calendar_event

Code

public function hasBundleData($bundle_id) {
  $bundle_key = $this
    ->getEntityType()
    ->getKey('bundle');
  return (bool) $this
    ->getQuery()
    ->accessCheck(FALSE)
    ->condition($bundle_key, $bundle_id)
    ->range(0, 1)
    ->execute();
}