original_string: protected function _renderContent($data)
      {
          $options = $data['options'];
  
          if ($options instanceof Traversable) {
              $options = iterator_to_array($options);
          }
  
          if (!empty($data['empty'])) {
              $options = $this->_emptyValue($data['empty']) + (array)$options;
          }
          if (empty($options)) {
              return [];
          }
  
          $selected = isset($data['val']) ? $data['val'] : null;
          $disabled = null;
          if (isset($data['disabled']) && is_array($data['disabled'])) {
              $disabled = $data['disabled'];
          }
          $templateVars = $data['templateVars'];
  
          return $this->_renderOptions($options, $disabled, $selected, $templateVars, $data['escape']);
      }
code: protected function _renderContent($data)
      {
          $options = $data['options'];
  
          if ($options instanceof Traversable) {
              $options = iterator_to_array($options);
          }
  
          if (!empty($data['empty'])) {
              $options = $this->_emptyValue($data['empty']) + (array)$options;
          }
          if (empty($options)) {
              return [];
          }
  
          $selected = isset($data['val']) ? $data['val'] : null;
          $disabled = null;
          if (isset($data['disabled']) && is_array($data['disabled'])) {
              $disabled = $data['disabled'];
          }
          $templateVars = $data['templateVars'];
  
          return $this->_renderOptions($options, $disabled, $selected, $templateVars, $data['escape']);
      }
code_tokens: protected function _renderContent ( $ data ) { $ options = $ data [ 'options' ] ; if ( $ options instanceof Traversable ) { $ options = iterator_to_array ( $ options ) ; } if ( ! empty ( $ data [ 'empty' ] ) ) { $ options = $ this -> _emptyValue ( $ data [ 'empty' ] ) + ( array ) $ options ; } if ( empty ( $ options ) ) { return [ ] ; } $ selected = isset ( $ data [ 'val' ] ) ? $ data [ 'val' ] : null ; $ disabled = null ; if ( isset ( $ data [ 'disabled' ] ) && is_array ( $ data [ 'disabled' ] ) ) { $ disabled = $ data [ 'disabled' ] ; } $ templateVars = $ data [ 'templateVars' ] ; return $ this -> _renderOptions ( $ options , $ disabled , $ selected , $ templateVars , $ data [ 'escape' ] ) ; }
docstring: Render the contents of the select element.
  
  @param array $data The context for rendering a select.
  @return array
docstring_tokens: Render the contents of the select element .