You are here

function registration_get_types in Entity Registration 7

Same name and namespace in other branches
  1. 8.2 registration.module \registration_get_types()
  2. 8 registration.module \registration_get_types()
  3. 7.2 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.

9 calls to registration_get_types()
RegistrationStandardTestCase::testRegistrationType in tests/registration.test
Tests if registration type is set.
registration_entity_info_alter in ./registration.module
Implements hook_entity_info_alter().
registration_field_extra_fields in ./registration.module
Implements hook_field_extra_fields().
registration_field_widget_form in includes/registration.field.inc
Implements hook_field_widget_form().
registration_get_default_state in ./registration.module
Return default state

... See full list

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 1984

Code

function registration_get_types($name = NULL) {
  $types = entity_load_multiple_by_name('registration_type', isset($name) ? array(
    $name,
  ) : FALSE);
  return isset($name) ? reset($types) : $types;
}