芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/www/cepali/privacy/tests/fixtures/mock_mod_with_user_data_provider.php
. /** * Test provider using a fake plugin name. * * @package core_privacy * @copyright 2018 Jake Dallimore
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_testcomponent4\privacy; use core_privacy\local\request\writer; /** * Mock core_user_data_provider for unit tests. * @copyright 2018 Jake Dallimore
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider, \core_privacy\local\request\user_preference_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason() : string { return 'notimplemented'; } /** * Export all user preferences for the plugin. * * @param int $userid The userid of the user whose data is to be exported. */ public static function export_user_preferences(int $userid) { writer::export_user_preference('mod_testcomponent4', 'mykey', 'myvalue', 'mydescription'); } }