function registration_get_states_options in Entity Registration 7.2
Same name and namespace in other branches
- 8.2 registration.module \registration_get_states_options()
- 8 registration.module \registration_get_states_options()
- 7 registration.module \registration_get_states_options()
Get an array of states structured as options for a form select elements
Parameters
array $conditions:
Return value
array
6 calls to registration_get_states_options()
- RegistrationViewsHandlerStateEdit::views_form in modules/
registration_views/ registration_views.module - Add to and alter the form.
- registration_checkin_state_form in modules/
registration_checkin/ registration_checkin.module - Form builder for the checkin state AJAX form.
- registration_form in includes/
registration.forms.inc - Form callback: create or edit a registration.
- registration_type_form in includes/
registration_type.admin.inc - Generates the model type editing form.
- registration_views_set_state_action_form in modules/
registration_views/ registration_views.module - Per-action form for executing a bulk operation.
1 string reference to 'registration_get_states_options'
File
- ./
registration.module, line 1788
Code
function registration_get_states_options($conditions = array()) {
$options = array();
// Rules likes to pass an object as the first param in an option list callback. Get rid of it.
if (!is_array($conditions)) {
$conditions = array();
}
$states = registration_states($conditions);
foreach ($states as $state) {
$options[$state
->identifier()] = entity_label('registration_state', $state);
}
return $options;
}