public static function export_user_preferences(int $userid) {

        $preference = get_user_preferences('filemanager_recentviewmode');

        if ($preference !== null) {
            switch ($preference) {
                case 1:
                    $value = get_string('displayasicons', 'core_repository');
                    break;
                case 2:
                    $value = get_string('displayastree', 'core_repository');
                    break;
                case 3:
                    $value = get_string('displaydetails', 'core_repository');
                    break;
                default:
                    $value = $preference;
            }

            $desc = get_string('privacy:preference:filemanager_recentviewmode', 'core_form', $value);
            writer::export_user_preference('core_form', 'filemanager_recentviewmode', $preference, $desc);
        }
    }
public static function export_user_preferences(int $userid) {

        $preference = get_user_preferences('filemanager_recentviewmode');

        if ($preference !== null) {
            switch ($preference) {
                case 1:
                    $value = get_string('displayasicons', 'core_repository');
                    break;
                case 2:
                    $value = get_string('displayastree', 'core_repository');
                    break;
                case 3:
                    $value = get_string('displaydetails', 'core_repository');
                    break;
                default:
                    $value = $preference;
            }

            $desc = get_string('privacy:preference:filemanager_recentviewmode', 'core_form', $value);
            writer::export_user_preference('core_form', 'filemanager_recentviewmode', $preference, $desc);
        }
    }
public static function export_user_preferences ( int $ userid ) { $ preference = get_user_preferences ( 'filemanager_recentviewmode' ) ; if ( $ preference !== null ) { switch ( $ preference ) { case 1 : $ value = get_string ( 'displayasicons' , 'core_repository' ) ; break ; case 2 : $ value = get_string ( 'displayastree' , 'core_repository' ) ; break ; case 3 : $ value = get_string ( 'displaydetails' , 'core_repository' ) ; break ; default : $ value = $ preference ; } $ desc = get_string ( 'privacy:preference:filemanager_recentviewmode' , 'core_form' , $ value ) ; writer :: export_user_preference ( 'core_form' , 'filemanager_recentviewmode' , $ preference , $ desc ) ; } }
Export all user preferences for the subsystem.

@param int $userid The ID of the user whose data is to be exported.
Export all user preferences for the subsystem .