You are here

public function EventManager::isEvent in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/EventManager.php \Drupal\rng\EventManager::isEvent()
  2. 8 src/EventManager.php \Drupal\rng\EventManager::isEvent()

Determines if an entity is an event.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: An event entity.

Return value

bool Whether the entity is an event.

Overrides EventManagerInterface::isEvent

1 call to EventManager::isEvent()
EventManager::getMeta in src/EventManager.php
Get the meta instance for an event.

File

src/EventManager.php, line 64

Class

EventManager
Event manager for RNG.

Namespace

Drupal\rng

Code

public function isEvent(EntityInterface $entity) {
  return (bool) $this
    ->eventType($entity
    ->getEntityTypeId(), $entity
    ->bundle());
}