getEntity($row); // Current revision uses the node view path. return !$node->isDefaultRevision() ? Url::fromRoute('entity.node.revision', ['node' => $node->id(), 'node_revision' => $node->getRevisionId()]) : $node->urlInfo(); } /** * {@inheritdoc} */ protected function renderLink(ResultRow $row) { /** @var \Drupal\node\NodeInterface $node */ $node = $this->getEntity($row); if (!$node->getRevisionid()) { return ''; } $text = parent::renderLink($row); $this->options['alter']['query'] = $this->getDestinationArray(); return $text; } /** * {@inheritdoc} */ protected function getDefaultLabel() { return $this->t('View'); } }