Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 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.

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

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

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

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

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