private function deleteGroups() { $fieldsService = $this->getFieldsService(); foreach ($this->groups as $group) { $fieldsService->deleteGroupById($group->id); } }