original_string: function _elementToArray(&$element, $required, $error)
      {
          $ret = array(
              'name'      => $element->getName(),
              'value'     => $element->getValue(),
              'type'      => $element->getType(),
              'frozen'    => $element->isFrozen(),
              'required'  => $required,
              'error'     => $error
          );
          // render label(s)
          $labels = $element->getLabel();
          if (is_array($labels) && $this->_staticLabels) {
              foreach($labels as $key => $label) {
                  $key = is_int($key)? $key + 1: $key;
                  if (1 === $key) {
                      $ret['label'] = $label;
                  } else {
                      $ret['label_' . $key] = $label;
                  }
              }
          } else {
              $ret['label'] = $labels;
          }
  
          // set the style for the element
          if (isset($this->_elementStyles[$ret['name']])) {
              $ret['style'] = $this->_elementStyles[$ret['name']];
          }
          if ('group' == $ret['type']) {
              $ret['separator'] = $element->_separator;
              $ret['elements']  = array();
          } else {
              $ret['html']      = $element->toHtml();
          }
          return $ret;
      }
code: function _elementToArray(&$element, $required, $error)
      {
          $ret = array(
              'name'      => $element->getName(),
              'value'     => $element->getValue(),
              'type'      => $element->getType(),
              'frozen'    => $element->isFrozen(),
              'required'  => $required,
              'error'     => $error
          );
          // render label(s)
          $labels = $element->getLabel();
          if (is_array($labels) && $this->_staticLabels) {
              foreach($labels as $key => $label) {
                  $key = is_int($key)? $key + 1: $key;
                  if (1 === $key) {
                      $ret['label'] = $label;
                  } else {
                      $ret['label_' . $key] = $label;
                  }
              }
          } else {
              $ret['label'] = $labels;
          }
  
          // set the style for the element
          if (isset($this->_elementStyles[$ret['name']])) {
              $ret['style'] = $this->_elementStyles[$ret['name']];
          }
          if ('group' == $ret['type']) {
              $ret['separator'] = $element->_separator;
              $ret['elements']  = array();
          } else {
              $ret['html']      = $element->toHtml();
          }
          return $ret;
      }
code_tokens: function _elementToArray ( & $ element , $ required , $ error ) { $ ret = array ( 'name' => $ element -> getName ( ) , 'value' => $ element -> getValue ( ) , 'type' => $ element -> getType ( ) , 'frozen' => $ element -> isFrozen ( ) , 'required' => $ required , 'error' => $ error ) ; // render label(s) $ labels = $ element -> getLabel ( ) ; if ( is_array ( $ labels ) && $ this -> _staticLabels ) { foreach ( $ labels as $ key => $ label ) { $ key = is_int ( $ key ) ? $ key + 1 : $ key ; if ( 1 === $ key ) { $ ret [ 'label' ] = $ label ; } else { $ ret [ 'label_' . $ key ] = $ label ; } } } else { $ ret [ 'label' ] = $ labels ; } // set the style for the element if ( isset ( $ this -> _elementStyles [ $ ret [ 'name' ] ] ) ) { $ ret [ 'style' ] = $ this -> _elementStyles [ $ ret [ 'name' ] ] ; } if ( 'group' == $ ret [ 'type' ] ) { $ ret [ 'separator' ] = $ element -> _separator ; $ ret [ 'elements' ] = array ( ) ; } else { $ ret [ 'html' ] = $ element -> toHtml ( ) ; } return $ ret ; }
docstring: Creates an array representing an element
  
  @access private
  @param  object    An HTML_QuickForm_element object
  @param  bool      Whether an element is required
  @param  string    Error associated with the element
  @return array
docstring_tokens: Creates an array representing an element