protected function RevisionLinkRevert::getUrlInfo in Drupal 9
Same name and namespace in other branches
- 8 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 20
Class
- RevisionLinkRevert
- Field handler to present a link to revert a node to a revision.
Namespace
Drupal\node\Plugin\views\fieldCode
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(),
]);
}