public function RngRegistrationCreationSubscriber::acceptingRegistration in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/EventSubscriber/RngRegistrationCreationSubscriber.php \Drupal\rng\EventSubscriber\RngRegistrationCreationSubscriber::acceptingRegistration()
Determines if there is any remaining capacity.
Parameters
\Drupal\rng\Event\RegistrationAccessEvent $event:
File
- src/
EventSubscriber/ RngRegistrationCreationSubscriber.php, line 78
Class
- RngRegistrationCreationSubscriber
- Class RngRegistrationCreationSubscriber.
Namespace
Drupal\rng\EventSubscriberCode
public function acceptingRegistration(RegistrationAccessEvent $event) {
$meta = $this
->getMeta($event
->getContext());
if (!$meta
->isAcceptingRegistrations()) {
$event
->setAccess(FALSE);
}
}