original_string: public function exportValue(&$submitted, $assoc = false) {
  
          $value = '';
          $filetypeselement = null;
  
          foreach ($this->_elements as $key => $element) {
              if ($element->_attributes['name'] === 'filetypes') {
                  $filetypeselement = $this->_elements[$key];
              }
          }
  
          if ($filetypeselement) {
              $formval = $filetypeselement->exportValue($submitted[$this->getName()], false);
              if ($formval) {
                  $value = $this->util->normalize_file_types($formval);
                  if ($value === ['*'] && !$this->allowall) {
                      $value = [];
                  }
                  $value = implode(',', $value);
              }
          }
  
          return $this->_prepareValue($value, $assoc);
      }
code: public function exportValue(&$submitted, $assoc = false) {
  
          $value = '';
          $filetypeselement = null;
  
          foreach ($this->_elements as $key => $element) {
              if ($element->_attributes['name'] === 'filetypes') {
                  $filetypeselement = $this->_elements[$key];
              }
          }
  
          if ($filetypeselement) {
              $formval = $filetypeselement->exportValue($submitted[$this->getName()], false);
              if ($formval) {
                  $value = $this->util->normalize_file_types($formval);
                  if ($value === ['*'] && !$this->allowall) {
                      $value = [];
                  }
                  $value = implode(',', $value);
              }
          }
  
          return $this->_prepareValue($value, $assoc);
      }
code_tokens: public function exportValue ( & $ submitted , $ assoc = false ) { $ value = '' ; $ filetypeselement = null ; foreach ( $ this -> _elements as $ key => $ element ) { if ( $ element -> _attributes [ 'name' ] === 'filetypes' ) { $ filetypeselement = $ this -> _elements [ $ key ] ; } } if ( $ filetypeselement ) { $ formval = $ filetypeselement -> exportValue ( $ submitted [ $ this -> getName ( ) ] , false ) ; if ( $ formval ) { $ value = $ this -> util -> normalize_file_types ( $ formval ) ; if ( $ value === [ '*' ] && ! $ this -> allowall ) { $ value = [ ] ; } $ value = implode ( ',' , $ value ) ; } } return $ this -> _prepareValue ( $ value , $ assoc ) ; }
docstring: Return the selected file types.
  
  @param array $submitted submitted values
  @param bool $assoc if true the retured value is associated array
  @return array
docstring_tokens: Return the selected file types .