You are here

function registration_handler_field_entity_registration_status::render in Entity Registration 8.2

Same name in this branch
  1. 8.2 src/registration_handler_field_entity_registration_status.php \Drupal\registration\registration_handler_field_entity_registration_status::render()
  2. 8.2 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status::render()
  3. 8.2 modules/registration_views/src/registration_handler_field_entity_registration_status.php \Drupal\registration_views\registration_handler_field_entity_registration_status::render()
Same name and namespace in other branches
  1. 8 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status::render()
  2. 7.2 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status::render()
  3. 7 modules/registration_views/includes/registration_handler_field_entity_registration_status.inc \registration_handler_field_entity_registration_status::render()

File

modules/registration_views/includes/registration_handler_field_entity_registration_status.inc, line 7
Display registration status for host entity.

Class

registration_handler_field_entity_registration_status
@file Display registration status for host entity.

Code

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',
    ));
  }
}