You are here

protected function RevisionLinkRevert::getUrlInfo in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/views/field/RevisionLinkRevert.php \Drupal\node\Plugin\views\field\RevisionLinkRevert::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/RevisionLinkRevert.php, line 25
Contains \Drupal\node\Plugin\views\field\RevisionLinkRevert.

Class

RevisionLinkRevert
Field handler to present a link to revert a node to a 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_revert_confirm', [
    'node' => $node
      ->id(),
    'node_revision' => $node
      ->getRevisionId(),
  ]);
}