original_string: public function generateSelectField($attr)
      {
          if (empty($attr['name'])) {
              return '';
          }
  
          $options = array();
  
          if (! empty($attr['options'])) {
              $options = $attr['options'];
          }
          $options = $this->generateSelectOptions($options, $attr);
  
          unset($attr['options'], $attr['type'], $attr['selected']);
  
          return $this->Html->tag('select', $attr, $options, true);
      }
code: public function generateSelectField($attr)
      {
          if (empty($attr['name'])) {
              return '';
          }
  
          $options = array();
  
          if (! empty($attr['options'])) {
              $options = $attr['options'];
          }
          $options = $this->generateSelectOptions($options, $attr);
  
          unset($attr['options'], $attr['type'], $attr['selected']);
  
          return $this->Html->tag('select', $attr, $options, true);
      }
code_tokens: public function generateSelectField ( $ attr ) { if ( empty ( $ attr [ 'name' ] ) ) { return '' ; } $ options = array ( ) ; if ( ! empty ( $ attr [ 'options' ] ) ) { $ options = $ attr [ 'options' ] ; } $ options = $ this -> generateSelectOptions ( $ options , $ attr ) ; unset ( $ attr [ 'options' ] , $ attr [ 'type' ] , $ attr [ 'selected' ] ) ; return $ this -> Html -> tag ( 'select' , $ attr , $ options , true ) ; }
docstring: generate a select field
  
  @param   array   array of attributes
  @return  string
docstring_tokens: generate a select field