You are here

public function FieldConfigListBuilder::render in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/src/FieldConfigListBuilder.php \Drupal\field_ui\FieldConfigListBuilder::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/field_ui/src/FieldConfigListBuilder.php, line 104

Class

FieldConfigListBuilder
Provides lists of field config entities.

Namespace

Drupal\field_ui

Code

public function render($target_entity_type_id = NULL, $target_bundle = NULL) {
  $this->targetEntityTypeId = $target_entity_type_id;
  $this->targetBundle = $target_bundle;
  $build = parent::render();
  $build['table']['#attributes']['id'] = 'field-overview';
  $build['table']['#empty'] = $this
    ->t('No fields are present yet.');
  return $build;
}