original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Get the retention period fields.
  
  @param   string  $prefix The name of the main field, and prefix for the subfields.
  @return  \stdClass
docstring_tokens: Get the retention period fields .