Lines Matching refs:choices
949 * - choices: array of possible values, where the keys are the internally used values
962 * Either 'choices' or 'pattern' must be set (not both), all other values are optional.
967 * 'choices' => array('y' => array('yes', 'yeah'), 'n' => array('no', 'nay')),
1023 }, $p['choices']));
1054 } else if (isset($p['choices'])) { // Check whether the given property values are valid choices
1056 $choices = array();
1058 foreach ($p['choices'] as $nc => $c) {
1060 $choices = array_merge($choices, array_fill_keys($c, $nc));
1064 $choices[$c] = $c;
1068 if (!isset($choices['']) && isset($p['default'])) {
1069 $choices[''] = $choices[$p['default']];
1072 $incorrect = array_diff($values, array_keys($choices)); // Find all values that are not a valid choice
1074 unset($choices['']);
1079 $propertyValues[$variable] = array_map(function($v) use ($choices) { return $choices[$v]; }, $values);