public function GroupController::GroupAdd in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Controller/GroupController.php \Drupal\rng\Controller\GroupController::groupAdd()
- 3.x src/Controller/GroupController.php \Drupal\rng\Controller\GroupController::groupAdd()
Provides a group add form.
Parameters
\Drupal\Core\Entity\EntityInterface $rng_event: The RNG event.
Return value
array A registration form.
File
- src/
Controller/ GroupController.php, line 24
Class
- GroupController
- Controller for Registration Groups.
Namespace
Drupal\rng\ControllerCode
public function GroupAdd(EntityInterface $rng_event) {
$group = Group::create()
->setEvent($rng_event);
return $this
->entityFormBuilder()
->getForm($group, 'add', [
$rng_event,
]);
}