function entity_background_selection_list in Entity background 7
Callback function used in list_text select list.
Return value
array An array of all list options.
1 call to entity_background_selection_list()
- EntityBackgroundAPITest::testEntityBackgroundTestAPI in tests/
entity_background.test - Test basic APIs.
1 string reference to 'entity_background_selection_list'
- entity_background_get_field_eb_selection in includes/
entity_background.fields_crud.inc - Create eb_selection field.
File
- includes/
entity_background.fields_crud.inc, line 120 - Fields CRUD functions.
Code
function entity_background_selection_list() {
$groups = field_group_read_groups();
$options = array();
if (!empty($groups[EB_FC_ENTITY][EB_FIELD]['form'])) {
$group_list = $groups[EB_FC_ENTITY][EB_FIELD]['form'];
foreach ($group_list as $name => $group) {
$options[$name] = $group->label;
}
}
return $options;
}