You are here

public function Registration::canAddRegistrants in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/Registration.php \Drupal\rng\Entity\Registration::canAddRegistrants()

@inheritDoc

Overrides RegistrationInterface::canAddRegistrants

2 calls to Registration::canAddRegistrants()
Registration::addIdentity in src/Entity/Registration.php
Shortcut to add a registrant entity.
Registration::createStubs in src/Entity/Registration.php

File

src/Entity/Registration.php, line 505

Class

Registration
Defines the registration entity class.

Namespace

Drupal\rng\Entity

Code

public function canAddRegistrants() {
  $registrants = $this
    ->getRegistrantIds();
  $qty = $this
    ->getRegistrantQty();
  if ($qty) {
    return $qty > count($registrants);
  }
  return TRUE;
}