You are here

function list_test_allowed_values_callback in Drupal 7

Allowed values callback.

2 string references to 'list_test_allowed_values_callback'
OptionsWidgetsTestCase::testSelectListMultiple in modules/field/modules/options/options.test
Tests the 'options_select' widget (multiple select).
OptionsWidgetsTestCase::testSelectListSingle in modules/field/modules/options/options.test
Tests the 'options_select' widget (single select).

File

modules/field/modules/list/tests/list_test.module, line 11
Helper module for the List module tests.

Code

function list_test_allowed_values_callback($field) {
  $values = array(
    'Group 1' => array(
      0 => 'Zero',
    ),
    1 => 'One',
    'Group 2' => array(
      2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
    ),
  );
  return $values;
}