You are here

public function DeviceListBuilder::render in Responsive Theme Preview 8

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 DraggableListBuilder::render

File

src/DeviceListBuilder.php, line 90

Class

DeviceListBuilder
Provides a listing of Device entities.

Namespace

Drupal\responsive_preview

Code

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