protected function RevisionLink::renderLink in Support Ticketing System 8
Prepares the link to view a entity.
Parameters
\Drupal\views\ResultRow $row: A view result row.
Return value
string Returns a string for the link text.
Overrides LinkBase::renderLink
File
- modules/
support_ticket/ src/ Plugin/ views/ field/ RevisionLink.php, line 38 - Contains \Drupal\support_ticket\Plugin\views\field\RevisionLink.
Class
- RevisionLink
- Field handler to present a link to a support ticket revision.
Namespace
Drupal\support_ticket\Plugin\views\fieldCode
protected function renderLink(ResultRow $row) {
/** @var \Drupal\support_ticket\SupportTicketInterface $support_ticket */
$support_ticket = $this
->getEntity($row);
if (!$support_ticket
->getRevisionId()) {
return '';
}
$text = parent::renderLink($row);
$this->options['alter']['query'] = $this
->getDestinationArray();
return $text;
}