class registration_handler_field_entity_settings_link in Entity Registration 8.2
Same name in this branch
- 8.2 src/registration_handler_field_entity_settings_link.php \Drupal\registration\registration_handler_field_entity_settings_link
- 8.2 modules/registration_views/includes/registration_handler_field_entity_settings_link.inc \registration_handler_field_entity_settings_link
- 8.2 modules/registration_views/src/registration_handler_field_entity_settings_link.php \Drupal\registration_views\registration_handler_field_entity_settings_link
Same name and namespace in other branches
- 8 modules/registration_views/includes/registration_handler_field_entity_settings_link.inc \registration_handler_field_entity_settings_link
- 7.2 modules/registration_views/includes/registration_handler_field_entity_settings_link.inc \registration_handler_field_entity_settings_link
- 7 modules/registration_views/includes/registration_handler_field_entity_settings_link.inc \registration_handler_field_entity_settings_link
@file Field handler to render a link to edit entity registration settings.
Hierarchy
- class \registration_handler_field_registration_link extends \views_handler_field_entity
Expanded class hierarchy of registration_handler_field_entity_settings_link
1 string reference to 'registration_handler_field_entity_settings_link'
- registration_views_views_data_alter in modules/
registration_views/ registration_views.module - Implements hook_views_data_alter().
File
- modules/
registration_views/ includes/ registration_handler_field_entity_settings_link.inc, line 6 - Field handler to render a link to edit entity registration settings.
View source
class registration_handler_field_entity_settings_link extends registration_handler_field_registration_link {
/**
* Renders the link.
*/
function render_link($entity, $values) {
// Ensure user has access to edit registration settings.
if (!registration_administer_registrations_access($this->entity_type, $entity)) {
return;
}
$uri = entity_uri($this->entity_type, $entity);
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = $uri['path'] . '/registrations/settings';
$this->options['alter']['query'] = drupal_get_destination();
$text = !empty($this->options['text']) ? $this->options['text'] : t('settings');
return $text;
}
}