original_string: private function getMappedSettings(array $settings, $fromIndex, $toIndex)
      {
          $mappedSettings = ['sourceOrder' => [], 'sources' => []];
  
          if (isset($settings['sourceOrder'])) {
              foreach ($settings['sourceOrder'] as $row) {
                  if ('key' == $row[0]) {
                      $row[1] = $this->getSource('', $row[1], $fromIndex, $toIndex);
                  }
                  $mappedSettings['sourceOrder'][] = $row;
              }
          }
  
          if (isset($settings['sources'])) {
              foreach ($settings['sources'] as $source => $sourceSettings) {
                  $mappedSource = $this->getSource('', $source, $fromIndex, $toIndex);
                  $mappedSettings['sources'][$mappedSource] = [
                    'tableAttributes' => $this->getSources('', $sourceSettings['tableAttributes'], $fromIndex, $toIndex),
                  ];
              }
          }
  
          return $mappedSettings;
      }
code: private function getMappedSettings(array $settings, $fromIndex, $toIndex)
      {
          $mappedSettings = ['sourceOrder' => [], 'sources' => []];
  
          if (isset($settings['sourceOrder'])) {
              foreach ($settings['sourceOrder'] as $row) {
                  if ('key' == $row[0]) {
                      $row[1] = $this->getSource('', $row[1], $fromIndex, $toIndex);
                  }
                  $mappedSettings['sourceOrder'][] = $row;
              }
          }
  
          if (isset($settings['sources'])) {
              foreach ($settings['sources'] as $source => $sourceSettings) {
                  $mappedSource = $this->getSource('', $source, $fromIndex, $toIndex);
                  $mappedSettings['sources'][$mappedSource] = [
                    'tableAttributes' => $this->getSources('', $sourceSettings['tableAttributes'], $fromIndex, $toIndex),
                  ];
              }
          }
  
          return $mappedSettings;
      }
code_tokens: private function getMappedSettings ( array $ settings , $ fromIndex , $ toIndex ) { $ mappedSettings = [ 'sourceOrder' => [ ] , 'sources' => [ ] ] ; if ( isset ( $ settings [ 'sourceOrder' ] ) ) { foreach ( $ settings [ 'sourceOrder' ] as $ row ) { if ( 'key' == $ row [ 0 ] ) { $ row [ 1 ] = $ this -> getSource ( '' , $ row [ 1 ] , $ fromIndex , $ toIndex ) ; } $ mappedSettings [ 'sourceOrder' ] [ ] = $ row ; } } if ( isset ( $ settings [ 'sources' ] ) ) { foreach ( $ settings [ 'sources' ] as $ source => $ sourceSettings ) { $ mappedSource = $ this -> getSource ( '' , $ source , $ fromIndex , $ toIndex ) ; $ mappedSettings [ 'sources' ] [ $ mappedSource ] = [ 'tableAttributes' => $ this -> getSources ( '' , $ sourceSettings [ 'tableAttributes' ] , $ fromIndex , $ toIndex ) , ] ; } } return $ mappedSettings ; }
docstring: Get mapped element index settings, converting source ids to handles or back again.
  
  @param array  $settings
  @param string $fromIndex
  @param string $toIndex
  
  @return array
docstring_tokens: Get mapped element index settings converting source ids to handles or back again .