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