original_string: protected function _addNestedFieldsToExportModel(\MUtil_Model_ModelAbstract $model, array $data, array &$prefixes)
      {
          // Set labels in the main model for the submodel fields
          if ($model->getMeta('nested', false)) {
              $nestedNames = $model->getMeta('nestedNames');
              foreach($nestedNames as $nestedName) {
                  $nestedModel = $model->get($nestedName, 'model');
                  $nestedLabels = $nestedModel->getcolNames('label');
                  foreach($nestedLabels as $colName) {
                      $label = $nestedModel->get($colName, 'label');
                      $model->set($colName, 'label', $label);
                  }
                  $model->remove($nestedName, 'label');
              }
          }
      }
code: protected function _addNestedFieldsToExportModel(\MUtil_Model_ModelAbstract $model, array $data, array &$prefixes)
      {
          // Set labels in the main model for the submodel fields
          if ($model->getMeta('nested', false)) {
              $nestedNames = $model->getMeta('nestedNames');
              foreach($nestedNames as $nestedName) {
                  $nestedModel = $model->get($nestedName, 'model');
                  $nestedLabels = $nestedModel->getcolNames('label');
                  foreach($nestedLabels as $colName) {
                      $label = $nestedModel->get($colName, 'label');
                      $model->set($colName, 'label', $label);
                  }
                  $model->remove($nestedName, 'label');
              }
          }
      }
code_tokens: protected function _addNestedFieldsToExportModel ( \ MUtil_Model_ModelAbstract $ model , array $ data , array & $ prefixes ) { // Set labels in the main model for the submodel fields if ( $ model -> getMeta ( 'nested' , false ) ) { $ nestedNames = $ model -> getMeta ( 'nestedNames' ) ; foreach ( $ nestedNames as $ nestedName ) { $ nestedModel = $ model -> get ( $ nestedName , 'model' ) ; $ nestedLabels = $ nestedModel -> getcolNames ( 'label' ) ; foreach ( $ nestedLabels as $ colName ) { $ label = $ nestedModel -> get ( $ colName , 'label' ) ; $ model -> set ( $ colName , 'label' , $ label ) ; } $ model -> remove ( $ nestedName , 'label' ) ; } } }
docstring: Add nested model fields to the export model
  
  @param MUtil_Model_ModelAbstract $model
  @param array $data
  @param array $prefixes
docstring_tokens: Add nested model fields to the export model