You are here

function LingotekTestCase::getFirstOption in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
  2. 7.5 tests/lingotek.setup.test \LingotekTestCase::getFirstOption()
  3. 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;
}