protected function makeInternalGroups() { $this->bootstrapped->set('groups', true); if (!$this->steps) { if (!$this->bootstrapped->steps) { $this->makeInternalSteps(); } else { return; } } $this->groups = new Group(); foreach ($this->steps as $step) { foreach ($step->getRelated('groups') as $group) { $this->groups->push($group); } } }