You are here

public function GroupController::GroupAdd in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Controller/GroupController.php \Drupal\rng\Controller\GroupController::groupAdd()
  2. 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\Controller

Code

public function GroupAdd(EntityInterface $rng_event) {
  $group = Group::create()
    ->setEvent($rng_event);
  return $this
    ->entityFormBuilder()
    ->getForm($group, 'add', [
    $rng_event,
  ]);
}