You are here

public function GroupListBuilder::render in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/Lists/GroupListBuilder.php \Drupal\rng\Lists\GroupListBuilder::render()
  2. 3.x src/Lists/GroupListBuilder.php \Drupal\rng\Lists\GroupListBuilder::render()

Parameters

\Drupal\Core\Entity\EntityInterface $rng_event: The event entity to display registrations.

Overrides EntityListBuilder::render

File

src/Lists/GroupListBuilder.php, line 62

Class

GroupListBuilder
Builds a list of registration groups.

Namespace

Drupal\rng\Lists

Code

public function render(EntityInterface $rng_event = NULL) {
  if (isset($rng_event)) {
    $this->event = $rng_event;
  }
  $render = parent::render();
  $render['description'] = [
    '#prefix' => '<p>',
    '#markup' => $this
      ->t('Groups allow you to organize registrations. Some pre-made groups are automatically applied to registrations.'),
    '#suffix' => '</p>',
    '#weight' => -50,
  ];
  $render['table']['#empty'] = t('No groups found for this event.');
  return $render;
}