MDL-57273 core: Exporters support custom formatting parameters
This commit is contained in:
committed by
Damyon Wiese
parent
268beda8e9
commit
4bc68a416e
+24
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user