You are here

class registration_handler_field_entity_capacity_used 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
  2. 8.2 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used
  3. 8.2 modules/registration_views/src/registration_handler_field_entity_capacity_used.php \Drupal\registration_views\registration_handler_field_entity_capacity_used
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
  2. 7.2 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used
  3. 7 modules/registration_views/includes/registration_handler_field_entity_capacity_used.inc \registration_handler_field_entity_capacity_used

@file Display maximum slots for an entity.

Hierarchy

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

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

View 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);
  }

}

Members