function registration_get_states_options in Entity Registration 8.2
Same name and namespace in other branches
- 8 registration.module \registration_get_states_options()
- 7.2 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.
- RegistrationViewsHandlerStateEdit::views_form in modules/
registration_views/ src/ RegistrationViewsHandlerStateEdit.php - Add to and alter the 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.
2 string references to 'registration_get_states_options'
File
- ./
registration.module, line 1756
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()] = $state
->label();
}
return $options;
}