protected function allowedValuesString(array $values) {
    $lines = [];
    foreach ($values as $key => $value) {
      if (is_array($value)) {
        $lines[$key] = implode("|", $value);;
      }
    }
    return implode("\n", $lines);
  }
protected function allowedValuesString(array $values) {
    $lines = [];
    foreach ($values as $key => $value) {
      if (is_array($value)) {
        $lines[$key] = implode("|", $value);;
      }
    }
    return implode("\n", $lines);
  }
protected function allowedValuesString ( array $ values ) { $ lines = [ ] ; foreach ( $ values as $ key => $ value ) { if ( is_array ( $ value ) ) { $ lines [ $ key ] = implode ( "|" , $ value ) ; ; } } return implode ( "\n" , $ lines ) ; }
Generates a string representation of an array of 'allowed values'.

This string format is suitable for edition in a textarea.

@param array $values
An array of values, where array keys are values and array values are
labels.

@return string
The string representation of the $values array:
- Values are separated by a carriage return.
- Each value is in the format "value|label" or "value".
Generates a string representation of an array of allowed values .