public static function WebformOptionsHelper::getOptionsText in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Utility/WebformOptionsHelper.php \Drupal\webform\Utility\WebformOptionsHelper::getOptionsText()
Replace associative array of option values with option text.
Parameters
array $values: The option value.
array $options: An associative array of options.
Return value
array An associative array of option values with option text.
1 call to WebformOptionsHelper::getOptionsText()
- WebformOptionsHelperTest::testGetOptionsText in tests/
src/ Unit/ Utility/ WebformOptionsHelperTest.php - Tests WebformOptionsHelper::getOptionsText().
File
- src/
Utility/ WebformOptionsHelper.php, line 77
Class
- WebformOptionsHelper
- Helper class webform options based methods.
Namespace
Drupal\webform\UtilityCode
public static function getOptionsText(array $values, array $options) {
foreach ($values as &$value) {
$value = self::getOptionText($value, $options);
}
return $values;
}