original_string: protected function getExportTypeElements(array $data)
      {
          $export = $this->loader->getExport();
          $exportTypes = $export->getExportClasses();
  
          if (isset($data['type'])) {
              $currentType = $data['type'];
          } else {
              reset($exportTypes);
              $currentType = key($exportTypes);
          }
  
          $elements['type_label'] = $this->_('Export to');
  
          $elements['type'] = $this->_createSelectElement( 'type', $exportTypes);
          $elements['type']->setAttrib('onchange', 'this.form.submit();');
          // $elements['step'] = $this->form->createElement('hidden', 'step');;
  
          $exportClass = $export->getExport($currentType);
          $exportName  = $exportClass->getName();
          $exportFormElements = $exportClass->getFormElements($this->form, $data);
  
          if ($exportFormElements) {
              $elements['firstCheck'] = $this->form->createElement('hidden', $currentType);
              foreach ($exportFormElements as $key => $formElement) {
                  $elements['type_br_' . $key] = \MUtil_Html::create('br');
                  $elements['type_el_' . $key] = $formElement;
              }
          }
  
  //        if (!isset($data[$currentType])) {
  //            $data[$exportName] = $exportClass->getDefaultFormValues();
  //        }
  
          return $elements;
      }
code: protected function getExportTypeElements(array $data)
      {
          $export = $this->loader->getExport();
          $exportTypes = $export->getExportClasses();
  
          if (isset($data['type'])) {
              $currentType = $data['type'];
          } else {
              reset($exportTypes);
              $currentType = key($exportTypes);
          }
  
          $elements['type_label'] = $this->_('Export to');
  
          $elements['type'] = $this->_createSelectElement( 'type', $exportTypes);
          $elements['type']->setAttrib('onchange', 'this.form.submit();');
          // $elements['step'] = $this->form->createElement('hidden', 'step');;
  
          $exportClass = $export->getExport($currentType);
          $exportName  = $exportClass->getName();
          $exportFormElements = $exportClass->getFormElements($this->form, $data);
  
          if ($exportFormElements) {
              $elements['firstCheck'] = $this->form->createElement('hidden', $currentType);
              foreach ($exportFormElements as $key => $formElement) {
                  $elements['type_br_' . $key] = \MUtil_Html::create('br');
                  $elements['type_el_' . $key] = $formElement;
              }
          }
  
  //        if (!isset($data[$currentType])) {
  //            $data[$exportName] = $exportClass->getDefaultFormValues();
  //        }
  
          return $elements;
      }
code_tokens: protected function getExportTypeElements ( array $ data ) { $ export = $ this -> loader -> getExport ( ) ; $ exportTypes = $ export -> getExportClasses ( ) ; if ( isset ( $ data [ 'type' ] ) ) { $ currentType = $ data [ 'type' ] ; } else { reset ( $ exportTypes ) ; $ currentType = key ( $ exportTypes ) ; } $ elements [ 'type_label' ] = $ this -> _ ( 'Export to' ) ; $ elements [ 'type' ] = $ this -> _createSelectElement ( 'type' , $ exportTypes ) ; $ elements [ 'type' ] -> setAttrib ( 'onchange' , 'this.form.submit();' ) ; // $elements['step'] = $this->form->createElement('hidden', 'step');; $ exportClass = $ export -> getExport ( $ currentType ) ; $ exportName = $ exportClass -> getName ( ) ; $ exportFormElements = $ exportClass -> getFormElements ( $ this -> form , $ data ) ; if ( $ exportFormElements ) { $ elements [ 'firstCheck' ] = $ this -> form -> createElement ( 'hidden' , $ currentType ) ; foreach ( $ exportFormElements as $ key => $ formElement ) { $ elements [ 'type_br_' . $ key ] = \ MUtil_Html :: create ( 'br' ) ; $ elements [ 'type_el_' . $ key ] = $ formElement ; } } //        if (!isset($data[$currentType])) { //            $data[$exportName] = $exportClass->getDefaultFormValues(); //        } return $ elements ; }
docstring: Returns export field elements for auto search.
  
  The form / html elements to search on. Elements can be grouped by inserting null's between them.
  That creates a distinct group of elements
  
  @param array $data The $form field values (can be usefull, but no need to set them)
  @return array Of \Zend_Form_Element's or static tekst to add to the html or null for group breaks.
docstring_tokens: Returns export field elements for auto search .