public static function delete_field_configuration(field_controller $field) : bool {
        $event = field_deleted::create_from_object($field);
        get_file_storage()->delete_area_files($field->get_handler()->get_configuration_context()->id, 'core_customfield',
            'description', $field->get('id'));
        $result = $field->delete();
        $event->trigger();
        return $result;
    }