You are here

function matrix_allowed_values_example in Matrix field 8.2

Same name and namespace in other branches
  1. 7.2 matrix.module \matrix_allowed_values_example()

Example function for providing a list of allowed values for a select list

Parameters

$field: The field array

Return value

An array of key-value pairs

File

./matrix.module, line 964
Contains matrix.module.

Code

function matrix_allowed_values_example($field) {
  return array(
    10 => t('Ten'),
    20 => t('Twenty'),
    30 => t('Thirty'),
    40 => t('Forty'),
    50 => t('Fifty'),
  );
}