original_string: public function getFields($blnIncludeMultiFields = false)
      {
          $objFields = new Collection();
  
          foreach ($this->__elements as $objPage) {
              if ($objPage->hasFields()) {
                  foreach ($objPage->getFields() as $objFieldset) {
                      if ($objFieldset->hasFields()) {
                          foreach ($objFieldset->getFields() as $objField) {
                              if (is_object($objField)) {
                                  if ($objField->hasFields()) {
                                      // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                      if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                          $objFields->addObject($objField);
                                      }
  
                                      foreach ($objField->getFields() as $objSubField) {
                                          if (is_object($objSubField)) {
                                              if ($objSubField->hasFields()) {
                                                  // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                                  if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                                      $objFields->addObject($objField);
                                                  }
  
                                                  foreach ($objSubField->getFields() as $objSubSubField) {
                                                      if (is_object($objSubSubField)) {
                                                          $objFields->addObject($objSubSubField);
                                                      }
                                                  }
                                              } else {
                                                  $objFields->addObject($objSubField);
                                              }
                                          }
                                      }
                                  } else {
                                      $objFields->addObject($objField);
                                  }
                              }
                          }
                      } else {
                          $objFields->addObject($objFieldset);
                      }
                  }
              } else {
                  $objFields->addObject($objPage);
              }
          }
  
          return $objFields;
      }
code: public function getFields($blnIncludeMultiFields = false)
      {
          $objFields = new Collection();
  
          foreach ($this->__elements as $objPage) {
              if ($objPage->hasFields()) {
                  foreach ($objPage->getFields() as $objFieldset) {
                      if ($objFieldset->hasFields()) {
                          foreach ($objFieldset->getFields() as $objField) {
                              if (is_object($objField)) {
                                  if ($objField->hasFields()) {
                                      // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                      if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                          $objFields->addObject($objField);
                                      }
  
                                      foreach ($objField->getFields() as $objSubField) {
                                          if (is_object($objSubField)) {
                                              if ($objSubField->hasFields()) {
                                                  // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true.
                                                  if (get_class($objField) == "ValidFormBuilder\\MultiField" && $blnIncludeMultiFields) {
                                                      $objFields->addObject($objField);
                                                  }
  
                                                  foreach ($objSubField->getFields() as $objSubSubField) {
                                                      if (is_object($objSubSubField)) {
                                                          $objFields->addObject($objSubSubField);
                                                      }
                                                  }
                                              } else {
                                                  $objFields->addObject($objSubField);
                                              }
                                          }
                                      }
                                  } else {
                                      $objFields->addObject($objField);
                                  }
                              }
                          }
                      } else {
                          $objFields->addObject($objFieldset);
                      }
                  }
              } else {
                  $objFields->addObject($objPage);
              }
          }
  
          return $objFields;
      }
code_tokens: public function getFields ( $ blnIncludeMultiFields = false ) { $ objFields = new Collection ( ) ; foreach ( $ this -> __elements as $ objPage ) { if ( $ objPage -> hasFields ( ) ) { foreach ( $ objPage -> getFields ( ) as $ objFieldset ) { if ( $ objFieldset -> hasFields ( ) ) { foreach ( $ objFieldset -> getFields ( ) as $ objField ) { if ( is_object ( $ objField ) ) { if ( $ objField -> hasFields ( ) ) { // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true. if ( get_class ( $ objField ) == "ValidFormBuilder\\MultiField" && $ blnIncludeMultiFields ) { $ objFields -> addObject ( $ objField ) ; } foreach ( $ objField -> getFields ( ) as $ objSubField ) { if ( is_object ( $ objSubField ) ) { if ( $ objSubField -> hasFields ( ) ) { // Also add the multifield to the resulting collection, if $blnIncludeMultiFields is true. if ( get_class ( $ objField ) == "ValidFormBuilder\\MultiField" && $ blnIncludeMultiFields ) { $ objFields -> addObject ( $ objField ) ; } foreach ( $ objSubField -> getFields ( ) as $ objSubSubField ) { if ( is_object ( $ objSubSubField ) ) { $ objFields -> addObject ( $ objSubSubField ) ; } } } else { $ objFields -> addObject ( $ objSubField ) ; } } } } else { $ objFields -> addObject ( $ objField ) ; } } } } else { $ objFields -> addObject ( $ objFieldset ) ; } } } else { $ objFields -> addObject ( $ objPage ) ; } } return $ objFields ; }
docstring: getFields creates a flat collection of all form fields.
  
  @param boolean $blnIncludeMultiFields Set this to true if you want to include MultiFields in the collection
  @return Collection The collection of fields.
docstring_tokens: getFields creates a flat collection of all form fields .