You are here

public function CckSelectOtherTestBase::allowedValuesString in CCK Select Other 8

Convert select list options into allowed values string copied from Core.

Parameters

array $values: An associative array of values.

Return value

string An allowed values string.

See also

\Drupal\options\Plugin\Field\FieldType\FieldItemBase::allowedValuesString()

File

tests/src/Functional/CckSelectOtherTestBase.php, line 173

Class

CckSelectOtherTestBase
CCK Select Other functional test base class.

Namespace

Drupal\Tests\cck_select_other\Functional

Code

public function allowedValuesString(array $values) {
  $lines = [];
  foreach ($values as $key => $value) {
    $lines[] = "{$key}|{$value}";
  }
  return implode("\n", $lines);
}