ImageStyleListBuilder::render

public 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 50

Class

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

Namespace

Drupal\image

Code

public function render() {
  $build = parent::render();
  $build['table']['#empty'] = $this->t('There are currently no styles. <a href=":url">Add a new one</a>.', [
    ':url' => Url::fromRoute('image.style_add')->toString(),
  ]);
  return $build;
}
doc_Drupal
2016-10-29 09:19:59
Comments
Leave a Comment

Please login to continue.