You are here

function registration_get_states in Entity Registration 8

Same name and namespace in other branches
  1. 8.2 registration.module \registration_get_states()
  2. 7.2 registration.module \registration_get_states()
  3. 7 registration.module \registration_get_states()

Gets an array of all registration states, keyed by the name.

Parameters

$name: If set, the type with the given name is returned.

3 calls to registration_get_states()
registration_update_7100 in ./registration.install
Change registration_state.state field from int to varchar.
registration_waitlist_entity_presave in modules/registration_waitlist/registration_waitlist.module
Implements hook_entity_presave().
registration_waitlist_is_active in modules/registration_waitlist/registration_waitlist.module
Determine if the waitlist is active for a given registration
1 string reference to 'registration_get_states'
registration_state_form in includes/registration.forms.inc
Generates the Registration state editing form.

File

./registration.module, line 1632

Code

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