original_string: private function copyRowsAndSetLabel($toTable, $fromTable, $label)
      {
          foreach ($fromTable->getRows() as $fromRow) {
              $oldColumns = $fromRow->getColumns();
              unset($oldColumns['label']);
  
              $columns = array_merge(array('label' => $label), $oldColumns);
              $row = new Row(array(
                                  Row::COLUMNS              => $columns,
                                  Row::METADATA             => $fromRow->getMetadata(),
                                  Row::DATATABLE_ASSOCIATED => $fromRow->getIdSubDataTable()
                             ));
              $toTable->addRow($row);
          }
      }
code: private function copyRowsAndSetLabel($toTable, $fromTable, $label)
      {
          foreach ($fromTable->getRows() as $fromRow) {
              $oldColumns = $fromRow->getColumns();
              unset($oldColumns['label']);
  
              $columns = array_merge(array('label' => $label), $oldColumns);
              $row = new Row(array(
                                  Row::COLUMNS              => $columns,
                                  Row::METADATA             => $fromRow->getMetadata(),
                                  Row::DATATABLE_ASSOCIATED => $fromRow->getIdSubDataTable()
                             ));
              $toTable->addRow($row);
          }
      }
code_tokens: private function copyRowsAndSetLabel ( $ toTable , $ fromTable , $ label ) { foreach ( $ fromTable -> getRows ( ) as $ fromRow ) { $ oldColumns = $ fromRow -> getColumns ( ) ; unset ( $ oldColumns [ 'label' ] ) ; $ columns = array_merge ( array ( 'label' => $ label ) , $ oldColumns ) ; $ row = new Row ( array ( Row :: COLUMNS => $ columns , Row :: METADATA => $ fromRow -> getMetadata ( ) , Row :: DATATABLE_ASSOCIATED => $ fromRow -> getIdSubDataTable ( ) ) ) ; $ toTable -> addRow ( $ row ) ; } }
docstring: Utility function used by mergeChildren. Copies the rows from one table,
  sets their 'label' columns to a value and adds them to another table.
  
  @param DataTable $toTable The table to copy rows to.
  @param DataTable $fromTable The table to copy rows from.
  @param string $label The value to set the 'label' column of every copied row.
docstring_tokens: Utility function used by mergeChildren . Copies the rows from one table sets their label columns to a value and adds them to another table .