original_string: private function setSocialIdSubtables($dataTable)
      {
          if ($dataTable instanceof DataTable\Map) {
              foreach ($dataTable->getDataTables() as $childTable) {
                  $this->setSocialIdSubtables($childTable);
              }
          } else {
              foreach ($dataTable->getRows() as $row) {
                  $socialName = $row->getColumn('label');
  
                  $i = 1; // start at one because idSubtable=0 is equivalent to idSubtable=false
                  foreach (Social::getInstance()->getDefinitions() as $name) {
                      if ($name == $socialName) {
                          $row->setNonLoadedSubtableId($i);
                          break;
                      }
  
                      ++$i;
                  }
              }
          }
      }
code: private function setSocialIdSubtables($dataTable)
      {
          if ($dataTable instanceof DataTable\Map) {
              foreach ($dataTable->getDataTables() as $childTable) {
                  $this->setSocialIdSubtables($childTable);
              }
          } else {
              foreach ($dataTable->getRows() as $row) {
                  $socialName = $row->getColumn('label');
  
                  $i = 1; // start at one because idSubtable=0 is equivalent to idSubtable=false
                  foreach (Social::getInstance()->getDefinitions() as $name) {
                      if ($name == $socialName) {
                          $row->setNonLoadedSubtableId($i);
                          break;
                      }
  
                      ++$i;
                  }
              }
          }
      }
code_tokens: private function setSocialIdSubtables ( $ dataTable ) { if ( $ dataTable instanceof DataTable \ Map ) { foreach ( $ dataTable -> getDataTables ( ) as $ childTable ) { $ this -> setSocialIdSubtables ( $ childTable ) ; } } else { foreach ( $ dataTable -> getRows ( ) as $ row ) { $ socialName = $ row -> getColumn ( 'label' ) ; $ i = 1 ; // start at one because idSubtable=0 is equivalent to idSubtable=false foreach ( Social :: getInstance ( ) -> getDefinitions ( ) as $ name ) { if ( $ name == $ socialName ) { $ row -> setNonLoadedSubtableId ( $ i ) ; break ; } ++ $ i ; } } } }
docstring: Sets the subtable IDs for the DataTable returned by getSocial.
  
  The IDs are int indexes into the array in of defined socials.
  
  @param DataTable $dataTable
docstring_tokens: Sets the subtable IDs for the DataTable returned by getSocial .