protected function FullName::renderLink in Ubercart 8.4
Renders whatever the data is as a link to the order.
Data should be made XSS safe prior to calling this function.
1 call to FullName::renderLink()
- FullName::render in uc_order/
src/ Plugin/ views/ field/ FullName.php - Renders the field.
File
- uc_order/
src/ Plugin/ views/ field/ FullName.php, line 70
Class
- FullName
- Field handler to provide full names.
Namespace
Drupal\uc_order\Plugin\views\fieldCode
protected function renderLink($data, $values) {
$account = \Drupal::currentUser();
if (!empty($this->options['link_to_user']) && $account
->hasPermission('access user profiles')) {
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = 'user/' . $this
->getValue($values, 'uid');
}
return $data;
}