function LingotekTestCase::getFirstOption in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
- 7.4 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
- 7.6 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
File
- tests/
lingotek.setup.test, line 193 - Lingotek Setup Test Case
Class
- LingotekTestCase
- @file Lingotek Setup Test Case
Code
function getFirstOption($element) {
// debug((string)$element[0]->option[1]);
$str = '';
$option = $element[0]->option[1];
if (!empty($option)) {
$attributes = $option
->attributes();
$str = (string) $attributes['value'];
}
return $str;
}