function LingotekTestCase::getFirstOption in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
- 7.5 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
- 7.6 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
File
- tests/
lingotek.setup.test, line 185
Class
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;
}