function registration_handler_field_entity_capacity_used::render in Entity Registration 7.2
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()
- 8 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()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field_numeric::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);
}