protected function PrintLink::getUrlInfo in Entity Print 8.2
Returns the URI elements of the link.
Parameters
\Drupal\views\ResultRow $row: A view result row.
Return value
\Drupal\Core\Url The URI elements of the link.
Overrides LinkBase::getUrlInfo
File
- modules/
entity_print_views/ src/ Plugin/ views/ field/ PrintLink.php, line 63
Class
- PrintLink
- Field handler to present print links for an entity.
Namespace
Drupal\entity_print_views\Plugin\views\fieldCode
protected function getUrlInfo(ResultRow $row) {
$entity = $this
->getEntity($row);
if (!empty($this->options['open_new_window'])) {
$this->options['alter']['target'] = '_blank';
}
return Url::fromRoute('entity_print.view', [
'entity_type' => $entity
->getEntityTypeId(),
'entity_id' => $entity
->id(),
'export_type' => $this->options['export_type'],
]);
}