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');
            }
        }
    }
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');
            }
        }
    }
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' ) ; } } }
Add nested model fields to the export model

@param MUtil_Model_ModelAbstract $model
@param array $data
@param array $prefixes
Add nested model fields to the export model