src/wcmf/lib/presentation/control/ValueListProvider.php
protected static function getItemValue($list, $key) {
    foreach ($list as $item) {
      // strict comparison for null value
      if (($key === null && $item['key'] === $key) || ($key !== null && strval($item['key']) === strval($key))) {
        return $item['value'];
      }
    }
    return $key;
  }
protected static function getItemValue($list, $key) {
    foreach ($list as $item) {
      // strict comparison for null value
      if (($key === null && $item['key'] === $key) || ($key !== null && strval($item['key']) === strval($key))) {
        return $item['value'];
      }
    }
    return $key;
  }
protected static function getItemValue ( $ list , $ key ) { foreach ( $ list as $ item ) { // strict comparison for null value if ( ( $ key === null && $ item [ 'key' ] === $ key ) || ( $ key !== null && strval ( $ item [ 'key' ] ) === strval ( $ key ) ) ) { return $ item [ 'value' ] ; } } return $ key ; }
Get the value of the item with the given key. Returns the key, if it does
not exist in the list.
@param $list Array of associative arrays with keys 'key' and 'value'
@param $key The key to search
@return String
Get the value of the item with the given key . Returns the key if it does not exist in the list .