function list_test_dynamic_values_callback
7.x list_test.module | list_test_dynamic_values_callback($field, $instance, $entity_type, $entity, &$cacheable) |
An entity-bound allowed values callback.
1 string reference to 'list_test_dynamic_values_callback'
- ListDynamicValuesTestCase::setUp in drupal-7.x/
modules/ field/ modules/ list/ tests/ list.test - Set the default field storage backend for fields created during tests.
File
- drupal-7.x/
modules/ field/ modules/ list/ tests/ list_test.module, line 28 - Helper module for the List module tests.
Code
function list_test_dynamic_values_callback($field, $instance, $entity_type, $entity, &$cacheable) {
$cacheable = FALSE;
// We need the values of the entity as keys.
return drupal_map_assoc(array_merge(array($entity->ftlabel), entity_extract_ids($entity_type, $entity)));
}