function registration_handler_field_entity_capacity_used::render in Entity Registration 8
Same name in this branch
- 8 src/registration_handler_field_entity_capacity_used.php \Drupal\registration\registration_handler_field_entity_capacity_used::render()
- 8 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used::render()
Same name and namespace in other branches
- 8.2 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used::render()
- 7.2 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used::render()
- 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);
}