mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-69371 output: Allow null return for export_for_action_menu()
This commit is contained in:
parent
ca229dfcad
commit
1181f34253
@ -123,10 +123,10 @@ class language_menu implements \renderable, \templatable {
|
||||
* @param \renderer_base $output
|
||||
* @return \stdClass action_menu data export.
|
||||
*/
|
||||
public function export_for_action_menu(\renderer_base $output): \stdClass {
|
||||
public function export_for_action_menu(\renderer_base $output): ?\stdClass {
|
||||
$languagedata = $this->export_for_template($output);
|
||||
if (empty($languagedata)) {
|
||||
return [];
|
||||
return null;
|
||||
}
|
||||
$langmenu = new \action_menu();
|
||||
$menuname = \get_string('language');
|
||||
|
Loading…
x
Reference in New Issue
Block a user