function registration_handler_field_registration_link_edit::render_link in Entity Registration 8
Same name in this branch
- 8 src/registration_handler_field_registration_link_edit.php \Drupal\registration\registration_handler_field_registration_link_edit::render_link()
- 8 modules/registration_views/includes/registration_handler_field_registration_link_edit.inc \registration_handler_field_registration_link_edit::render_link()
Same name and namespace in other branches
- 8.2 src/registration_handler_field_registration_link_edit.php \Drupal\registration\registration_handler_field_registration_link_edit::render_link()
Renders the link.
Overrides registration_handler_field_registration_link::render_link
File
- src/
registration_handler_field_registration_link_edit.php, line 13 - Field handler to render a link to edit a registration.
Class
- registration_handler_field_registration_link_edit
- @file Field handler to render a link to edit a registration.
Namespace
Drupal\registrationCode
function render_link($entity, $values) {
// Ensure user has access to edit this registration.
if (!entity_access('update', 'registration', $entity)) {
return;
}
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = "registration/{$entity->registration_id}/edit";
$this->options['alter']['query'] = drupal_get_destination();
$text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
return $text;
}