src/Registrar.php
private function registerFields(SectionInterface $section)
    {
        array_map(
            function (FieldInterface $field) use ($section) {
                add_settings_field(
                    $field->getId(),
                    $field->getTitle(),
                    $field->getRenderClosure(),
                    $this->pageSlug,
                    $section->getId(),
                    $field->getAdditionalArguments()
                );
            },
            $section->getFields()
        );
    }
private function registerFields(SectionInterface $section)
    {
        array_map(
            function (FieldInterface $field) use ($section) {
                add_settings_field(
                    $field->getId(),
                    $field->getTitle(),
                    $field->getRenderClosure(),
                    $this->pageSlug,
                    $section->getId(),
                    $field->getAdditionalArguments()
                );
            },
            $section->getFields()
        );
    }
Register fields of a section with WordPress.

@param SectionInterface $section Section which holds a list of its fields.

@return void