You are here

public function EventMeta::getRegistrationTypeIds in RNG - Events and Registrations 8.2

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

Gets a list of registration types IDs allowed for this event.

Return value

string[] An array of registration_type IDs.

Overrides EventMetaInterface::getRegistrationTypeIds

2 calls to EventMeta::getRegistrationTypeIds()
EventMeta::getRegistrationTypes in src/EventMeta.php
Gets a list of registration types allowed for this event.
EventMeta::registrationTypeIsValid in src/EventMeta.php
Checks if a registration type is allowed to be used on an event.

File

src/EventMeta.php, line 175

Class

EventMeta
Meta event wrapper for RNG.

Namespace

Drupal\rng

Code

public function getRegistrationTypeIds() {
  return array_map(function ($element) {
    return isset($element['target_id']) ? $element['target_id'] : [];
  }, $this
    ->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_TYPE}
    ->getValue());
}