public function EventMeta::getRegistrantsMaximum in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/EventMeta.php \Drupal\rng\EventMeta::getRegistrantsMaximum()
- 8 src/EventMeta.php \Drupal\rng\EventMeta::getRegistrantsMaximum()
File
- src/
EventMeta.php, line 266
Class
- EventMeta
- Meta event wrapper for RNG.
Namespace
Drupal\rngCode
public function getRegistrantsMaximum() {
if (isset($this
->getEvent()->{EventManagerInterface::FIELD_REGISTRANTS_CAPACITY})) {
$field = $this
->getEvent()->{EventManagerInterface::FIELD_REGISTRANTS_CAPACITY};
$maximum = $field->value;
if ($maximum !== '' && is_numeric($maximum) && $maximum >= 0) {
return $maximum;
}
}
return EventMetaInterface::CAPACITY_UNLIMITED;
}