MDL-57273 core: Exporters support custom formatting parameters

This commit is contained in:
Frederic Massart
2017-01-20 12:56:19 +08:00
committed by Damyon Wiese
parent 268beda8e9
commit 4bc68a416e
16 changed files with 334 additions and 30 deletions
+24
View File
@@ -24,6 +24,7 @@
namespace core_user\external;
defined('MOODLE_INTERNAL') || die();
use context_system;
use renderer_base;
use moodle_url;
@@ -66,6 +67,29 @@ class user_summary_exporter extends \core\external\exporter {
);
}
/**
* Get the format parameters for department.
*
* @return array
*/
protected function get_format_parameters_for_department() {
return [
'context' => context_system::instance(), // The system context is cached, so we can get it right away.
];
}
/**
* Get the format parameters for institution.
*
* @return array
*/
protected function get_format_parameters_for_institution() {
return [
'context' => context_system::instance(), // The system context is cached, so we can get it right away.
];
}
public static function define_properties() {
return array(
'id' => array(