You are here

function _lingotek_find_key in Lingotek Translation 8.2

1 call to _lingotek_find_key()
lingotek_update_8217 in ./lingotek.install
Move Lingotek profile to config metadata from settings.

File

./lingotek.install, line 1017
Install, update and uninstall functions for the Lingotek module.

Code

function _lingotek_find_key(&$keys, $id, array $array) {
  foreach ($array as $x => $y) {

    // if (!in_array($x, ['enabled', 'profile'])) {}
    if (is_array($y) && !in_array($id, [
      'enabled',
      'profile',
    ])) {
      $newId = empty($id) ? $x : $id . '.' . $x;
      _lingotek_find_key($keys, $newId, $y);
    }
    else {
      if (count($array) == 1) {
        $keys[] = $id;
      }
    }
  }
}