original_string: public function getFields()
      {
          $objFields = new Collection();
  
          foreach ($this->__elements as $objFieldset) {
              if ($objFieldset->hasFields()) {
                  /* @var $objField Base */
                  foreach ($objFieldset->getFields() as $objField) {
                      if (is_object($objField)) {
                          if ($objField->hasFields()) {
                              if (get_class($objField) == "ValidFormBuilder\\Area" && $objField->isActive()) {
                                  $objFields->addObject($objField);
                              }
  
                              foreach ($objField->getFields() as $objSubField) {
                                  if (is_object($objSubField)) {
                                      if ($objSubField->hasFields()) {
                                          if (get_class($objSubField) == "ValidFormBuilder\\Area"
                                              && $objSubField->isActive()
                                          ) {
                                              $objFields->addObject($objSubField);
                                          }
  
                                          foreach ($objSubField->getFields() as $objSubSubField) {
                                              if (is_object($objSubSubField)) {
                                                  $objFields->addObject($objSubSubField);
                                              }
                                          }
                                      } else {
                                          $objFields->addObject($objSubField);
                                      }
                                  }
                              }
                          } else {
                              $objFields->addObject($objField);
                          }
                      }
                  }
              } else {
                  $objFields->addObject($objFieldset);
              }
          }
  
          $this->__cachedfields = $objFields;
  
          return $objFields;
      }
code: public function getFields()
      {
          $objFields = new Collection();
  
          foreach ($this->__elements as $objFieldset) {
              if ($objFieldset->hasFields()) {
                  /* @var $objField Base */
                  foreach ($objFieldset->getFields() as $objField) {
                      if (is_object($objField)) {
                          if ($objField->hasFields()) {
                              if (get_class($objField) == "ValidFormBuilder\\Area" && $objField->isActive()) {
                                  $objFields->addObject($objField);
                              }
  
                              foreach ($objField->getFields() as $objSubField) {
                                  if (is_object($objSubField)) {
                                      if ($objSubField->hasFields()) {
                                          if (get_class($objSubField) == "ValidFormBuilder\\Area"
                                              && $objSubField->isActive()
                                          ) {
                                              $objFields->addObject($objSubField);
                                          }
  
                                          foreach ($objSubField->getFields() as $objSubSubField) {
                                              if (is_object($objSubSubField)) {
                                                  $objFields->addObject($objSubSubField);
                                              }
                                          }
                                      } else {
                                          $objFields->addObject($objSubField);
                                      }
                                  }
                              }
                          } else {
                              $objFields->addObject($objField);
                          }
                      }
                  }
              } else {
                  $objFields->addObject($objFieldset);
              }
          }
  
          $this->__cachedfields = $objFields;
  
          return $objFields;
      }
code_tokens: public function getFields ( ) { $ objFields = new Collection ( ) ; foreach ( $ this -> __elements as $ objFieldset ) { if ( $ objFieldset -> hasFields ( ) ) { /* @var $objField Base */ foreach ( $ objFieldset -> getFields ( ) as $ objField ) { if ( is_object ( $ objField ) ) { if ( $ objField -> hasFields ( ) ) { if ( get_class ( $ objField ) == "ValidFormBuilder\\Area" && $ objField -> isActive ( ) ) { $ objFields -> addObject ( $ objField ) ; } foreach ( $ objField -> getFields ( ) as $ objSubField ) { if ( is_object ( $ objSubField ) ) { if ( $ objSubField -> hasFields ( ) ) { if ( get_class ( $ objSubField ) == "ValidFormBuilder\\Area" && $ objSubField -> isActive ( ) ) { $ objFields -> addObject ( $ objSubField ) ; } foreach ( $ objSubField -> getFields ( ) as $ objSubSubField ) { if ( is_object ( $ objSubSubField ) ) { $ objFields -> addObject ( $ objSubSubField ) ; } } } else { $ objFields -> addObject ( $ objSubField ) ; } } } } else { $ objFields -> addObject ( $ objField ) ; } } } } else { $ objFields -> addObject ( $ objFieldset ) ; } } $ this -> __cachedfields = $ objFields ; return $ objFields ; }
docstring: Get a flat Collection of all internal elements.
  
  This loops through all elements and adds each element and their children to a new Collection which will be
  returned. This results in a flat Collection filled with ValidForm Builder elements.
  
  @return \ValidFormBuilder\Collection
docstring_tokens: Get a flat Collection of all internal elements .