class registration_handler_field_entity_registration_status in Entity Registration 8
Same name in this branch
- 8 src/registration_handler_field_entity_registration_status.php \Drupal\registration\registration_handler_field_entity_registration_status
- 8 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status
Same name and namespace in other branches
- 8.2 src/registration_handler_field_entity_registration_status.php \Drupal\registration\registration_handler_field_entity_registration_status
@file Display registration status for host entity.
Hierarchy
- class \Drupal\registration\registration_handler_field_entity_registration_status extends \Drupal\registration\views_handler_field_entity
Expanded class hierarchy of registration_handler_field_entity_registration_status
1 string reference to 'registration_handler_field_entity_registration_status'
- registration_views_views_data_alter in modules/
registration_views/ registration_views.module - Implements hook_views_data_alter().
File
- src/
registration_handler_field_entity_registration_status.php, line 8 - Display registration status for host entity.
Namespace
Drupal\registrationView source
class registration_handler_field_entity_registration_status extends views_handler_field_entity {
function render($values) {
$entity = $this
->get_value($values);
list($entity_id) = entity_extract_ids($this->entity_type, $entity);
$status = registration_status($this->entity_type, $entity_id);
if (isset($status)) {
return $status ? t('Open', array(), array(
'context' => 'registration',
)) : t('Closed', array(), array(
'context' => 'registration',
));
}
}
}