class registration_handler_field_registration_link_edit 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
- 8 modules/registration_views/includes/registration_handler_field_registration_link_edit.inc \registration_handler_field_registration_link_edit
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
@file Field handler to render a link to edit a registration.
Hierarchy
- class \Drupal\registration\registration_handler_field_registration_link extends \Drupal\registration\views_handler_field_entity
- class \Drupal\registration\registration_handler_field_registration_link_edit
Expanded class hierarchy of registration_handler_field_registration_link_edit
1 string reference to 'registration_handler_field_registration_link_edit'
- RegistrationViewsController::views_data in modules/
registration_views/ registration_views.module
File
- src/
registration_handler_field_registration_link_edit.php, line 8 - Field handler to render a link to edit a registration.
Namespace
Drupal\registrationView source
class registration_handler_field_registration_link_edit extends registration_handler_field_registration_link {
/**
* Renders the link.
*/
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;
}
}