You are here

public function EventMeta::registrationTypeIsValid in RNG - Events and Registrations 3.x

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

Checks if a registration type is allowed to be used on an event.

Parameters

\Drupal\rng\Entity\RegistrationTypeInterface: A registration type entity.

Return value

bool Whether the registration type can be used.

Overrides EventMetaInterface::registrationTypeIsValid

File

src/EventMeta.php, line 201

Class

EventMeta
Meta event wrapper for RNG.

Namespace

Drupal\rng

Code

public function registrationTypeIsValid(RegistrationTypeInterface $registration_type) {
  return in_array($registration_type
    ->id(), $this
    ->getRegistrationTypeIds());
}