class registration_handler_field_entity_capacity_used 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
- 8 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used
Same name and namespace in other branches
- 8.2 src/registration_handler_field_entity_capacity_used.php \Drupal\registration\registration_handler_field_entity_capacity_used
@file Display maximum slots for an entity.
Hierarchy
- class \Drupal\registration\registration_handler_field_entity_capacity_used extends \Drupal\registration\views_handler_field_numeric
Expanded class hierarchy of registration_handler_field_entity_capacity_used
1 string reference to 'registration_handler_field_entity_capacity_used'
- registration_views_views_data_alter in modules/
registration_views/ registration_views.module - Implements hook_views_data_alter().
File
- src/
registration_handler_field_entity_capacity_used.php, line 8 - Display maximum slots for an entity.
Namespace
Drupal\registrationView source
class registration_handler_field_entity_capacity_used extends views_handler_field_numeric {
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);
}
}