protected function get_retention_period_fields(string $prefix = '') : \stdClass {
        $prefix = "{$prefix}retentionperiod";
        $data = (object) [
            'fields' => [],
            'types' => [],
        ];

        $number = $this->_form->createElement('text', "{$prefix}number", null, ['size' => 8]);
        $data->types["{$prefix}number"] = PARAM_INT;

        $unitoptions = [
            'Y' => get_string('years'),
            'M' => strtolower(get_string('months')),
            'D' => strtolower(get_string('days'))
        ];
        $unit = $this->_form->createElement('select', "{$prefix}unit", '', $unitoptions);

        $data->fields[] = $this->_form->createElement(
                'group',
                $prefix,
                get_string('retentionperiod', 'tool_dataprivacy'),
                [
                    'number' => $number,
                    'unit' => $unit,
                ],
                null,
                false
            );

        return $data;
    }