function registration_handler_field_entity_registration_status::render 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::render()
- 8 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status::render()
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::render()
File
- src/
registration_handler_field_entity_registration_status.php, line 9 - Display registration status for host entity.
Class
- registration_handler_field_entity_registration_status
- @file Display registration status for host entity.
Namespace
Drupal\registrationCode
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',
));
}
}