You are here

public function RuleListBuilder::render in RNG - Events and Registrations 3.x

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

Parameters

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

Overrides EntityListBuilder::render

File

src/Lists/RuleListBuilder.php, line 73

Class

RuleListBuilder
Builds a list of rng rules.

Namespace

Drupal\rng\Lists

Code

public function render(EntityInterface $rng_event = NULL) {
  if (isset($rng_event)) {
    $this->event = $rng_event;
  }
  $this
    ->messenger()
    ->addMessage($this
    ->t('This rule list is for advanced users. Take care when committing any actions from this page.'), 'warning');
  $render = parent::render();
  $render['table']['#empty'] = t('No rules found for this event.');
  return $render;
}