Nette\Forms\Form::getGroups PHP Method

getGroups() public method

Returns all defined groups.
public getGroups ( ) : ControlGroup[]
return ControlGroup[]
    public function getGroups()
    {
        return $this->groups;
    }

Usage Example

 /**
  * Determines which groups should be rendered (visual groups with at least one control).
  *
  * @return ControlGroup[]
  */
 private function getGroupsToRender()
 {
     $groups = array_filter($this->form->getGroups(), function (ControlGroup $group) {
         return $group->getControls() && $group->getOption('visual');
     });
     return $groups;
 }
All Usage Examples Of Nette\Forms\Form::getGroups