Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

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

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.