You are here

public function ImageStyleListBuilder::render in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/image/src/ImageStyleListBuilder.php \Drupal\image\ImageStyleListBuilder::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

core/modules/image/src/ImageStyleListBuilder.php, line 92
Contains \Drupal\image\ImageStyleListBuilder.

Class

ImageStyleListBuilder
Defines a class to build a listing of image style entities.

Namespace

Drupal\image

Code

public function render() {
  $build = parent::render();
  $build['#empty'] = $this
    ->t('There are currently no styles. <a href=":url">Add a new one</a>.', array(
    ':url' => $this->urlGenerator
      ->generateFromRoute('image.style_add'),
  ));
  return $build;
}