function registration_get_types in Entity Registration 7.2
Same name and namespace in other branches
- 8.2 registration.module \registration_get_types()
- 8 registration.module \registration_get_types()
- 7 registration.module \registration_get_types()
Gets an array of all registration types, keyed by the name.
Parameters
$name: If set, the type with the given name is returned.
15 calls to registration_get_types()
- RegistrationStandardTestCase::testRegistrationType in tests/
registration.test - Tests if registration type is set.
- RegistrationViewsController::views_data in modules/
registration_views/ registration_views.module - Defines the result for hook_views_data().
- registration_entity_delete in ./
registration.module - Implements hook_entity_delete().
- registration_entity_info_alter in ./
registration.module - Implements hook_entity_info_alter().
- registration_field_extra_fields in ./
registration.module - Implements hook_field_extra_fields().
1 string reference to 'registration_get_types'
- registration_type_form in includes/
registration_type.admin.inc - Generates the model type editing form.
File
- ./
registration.module, line 2001
Code
function registration_get_types($name = NULL) {
if (isset($name)) {
if ($name) {
$types = entity_load_multiple_by_name('registration_type', array(
$name,
));
return $types ? reset($types) : NULL;
}
return NULL;
}
return entity_load_multiple_by_name('registration_type');
}