function PathAliasListBuilder::render

Same name in other branches
  1. 9 core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::render()
  2. 10 core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::render()
  3. 11.x core/modules/path/src/PathAliasListBuilder.php \Drupal\path\PathAliasListBuilder::render()

Overrides EntityListBuilder::render

File

core/modules/path/src/PathAliasListBuilder.php, line 118

Class

PathAliasListBuilder
Defines a class to build a listing of path_alias entities.

Namespace

Drupal\path

Code

public function render() {
    $keys = $this->currentRequest->query
        ->get('search');
    $build['path_admin_filter_form'] = $this->formBuilder
        ->getForm(PathFilterForm::class, $keys);
    $build += parent::render();
    $build['table']['#empty'] = $this->t('No path aliases available. <a href=":link">Add URL alias</a>.', [
        ':link' => Url::fromRoute('entity.path_alias.add_form')->toString(),
    ]);
    return $build;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.