EntityLinkRevisionRevert.php in Entity API 8
File
src/Plugin/views/field/EntityLinkRevisionRevert.php
View source
<?php
namespace Drupal\entity\Plugin\views\field;
use Drupal\views\Plugin\views\field\EntityLink;
use Drupal\views\ResultRow;
class EntityLinkRevisionRevert extends EntityLink {
protected function getEntityLinkTemplate() {
return 'revision-revert-form';
}
protected function renderLink(ResultRow $row) {
$this->options['alter']['query'] = $this
->getDestinationArray();
return parent::renderLink($row);
}
protected function getDefaultLabel() {
return $this
->t('revert');
}
}