Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

Contains class \core\output\language_menu

Copyright: 2021 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 179 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

language_menu:: (5 methods):
  __construct()
  show_language_menu()
  export_for_template()
  export_for_action_menu()
  export_for_single_select()


Class: language_menu  - X-Ref

Class for creating the language menu

__construct($page)   X-Ref
Language menu constructor.

param: moodle_page $page the moodle page that the languague menu belongs to.

show_language_menu()   X-Ref
Determine if the language menu should be shown.

return: bool true if the language menu should be shown.

export_for_template(\renderer_base $output)   X-Ref
Export the data.

return: array with the title for the menu and an array of items.
param: \renderer_base $output

export_for_action_menu(\renderer_base $output)   X-Ref
Export the data providing a structure for the core/action_menu template.

return: \stdClass action_menu data export.
param: \renderer_base $output

export_for_single_select(\renderer_base $output)   X-Ref
Export the data providing a structure for the core/single_select template.

return: \stdClass single_select data export.
param: \renderer_base $output