You are here

public function EventMeta::registrationTypeIsValid in RNG - Events and Registrations 8

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

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

Parameters

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

Return value

boolean Whether the registration type can be used.

Overrides EventMetaInterface::registrationTypeIsValid

File

src/EventMeta.php, line 165

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());
}