You are here

function registration_handler_field_entity_capacity_used::render in Entity Registration 8.2

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

File

modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc, line 7
Display maximum slots for an entity.

Class

registration_handler_field_entity_capacity_used
@file Display maximum slots for an entity.

Code

function render($values) {
  $entity_id = $this
    ->get_value($values);
  $table = $this->table;
  $alias = $this->field_alias;
  $slots_used = (int) registration_event_count($table, $entity_id);
  $values->{$alias} = $slots_used;
  return parent::render($values);
}