RevisionLinkDelete.php in Drupal 9
File
core/modules/node/src/Plugin/views/field/RevisionLinkDelete.php
View source
<?php
namespace Drupal\node\Plugin\views\field;
use Drupal\Core\Url;
use Drupal\views\ResultRow;
class RevisionLinkDelete extends RevisionLink {
protected function getUrlInfo(ResultRow $row) {
$node = $this
->getEntity($row);
return Url::fromRoute('node.revision_delete_confirm', [
'node' => $node
->id(),
'node_revision' => $node
->getRevisionId(),
]);
}
protected function getDefaultLabel() {
return $this
->t('Delete');
}
}