public function EventMeta::getDefaultGroups in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 8 src/EventMeta.php \Drupal\rng\EventMeta::getDefaultGroups()
- 3.x src/EventMeta.php \Drupal\rng\EventMeta::getDefaultGroups()
Get groups that should be added to all new registrations.
Return value
\Drupal\rng\Entity\GroupInterface[] An array of group entities.
Overrides EventMetaInterface::getDefaultGroups
File
- src/
EventMeta.php, line 270
Class
- EventMeta
- Meta event wrapper for RNG.
Namespace
Drupal\rngCode
public function getDefaultGroups() {
$groups = [];
foreach ($this
->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_GROUPS} as $group) {
$groups[] = $group->entity;
}
return $groups;
}