You are here

protected function RevisionLinkDelete::getUrlInfo in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/views/field/RevisionLinkDelete.php \Drupal\node\Plugin\views\field\RevisionLinkDelete::getUrlInfo()

Returns the URI elements of the link.

Parameters

\Drupal\views\ResultRow $row: A view result row.

Return value

\Drupal\Core\Url The URI elements of the link.

Overrides RevisionLink::getUrlInfo

File

core/modules/node/src/Plugin/views/field/RevisionLinkDelete.php, line 25
Contains \Drupal\node\Plugin\views\field\RevisionLinkDelete.

Class

RevisionLinkDelete
Field handler to present link to delete a node revision.

Namespace

Drupal\node\Plugin\views\field

Code

protected function getUrlInfo(ResultRow $row) {

  /** @var \Drupal\node\NodeInterface $node */
  $node = $this
    ->getEntity($row);
  return Url::fromRoute('node.revision_delete_confirm', [
    'node' => $node
      ->id(),
    'node_revision' => $node
      ->getRevisionId(),
  ]);
}