You are here

public function CalendarEventTypeListBuilder::render in Opigno calendar event 3.x

Same name and namespace in other branches
  1. 8 src/CalendarEventTypeListBuilder.php \Drupal\opigno_calendar_event\CalendarEventTypeListBuilder::render()

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides EntityListBuilder::render

File

src/CalendarEventTypeListBuilder.php, line 57

Class

CalendarEventTypeListBuilder
Defines a class to build a listing of calendar event type entities.

Namespace

Drupal\opigno_calendar_event

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this
    ->t('No calendar event types available. <a href=":link">Add event type</a>.', [
    ':link' => Url::fromRoute('entity.opigno_calendar_event_type.add_form')
      ->toString(),
  ]);
  return $build;
}