protected function getSection(FieldTypeInterface $field, $section = null): SectionInterface
    {
        if (is_null($section)) {
            if ($this->repository->hasGroup($field->getOption('group'))) {
                $section = $this->repository->getGroup($field->getOption('group'));
            } else {
                $section = new Section($field->getOption('group'));
            }

            $section->addItem($field);
        }

        return $section;
    }