You are here

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

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

Checks if this event is accepting new registrations.

This method only checks configuration. Instead you may want to check 'create' operation using entity_access.

Return value

bool Whether this event is accepting new registrations.

Overrides EventMetaInterface::isAcceptingRegistrations

File

src/EventMeta.php, line 164

Class

EventMeta
Meta event wrapper for RNG.

Namespace

Drupal\rng

Code

public function isAcceptingRegistrations() {
  return !empty($this
    ->getEvent()->{EventManagerInterface::FIELD_STATUS}->value);
}