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]

(no description)

File Size: 328 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: action_bar  - X-Ref

Class responsible for generating the action bar elements in the database module pages.

__construct(int $id, moodle_url $pageurl)   X-Ref
The class constructor.

param: int $id The database module id.
param: moodle_url $pageurl The URL of the current page.

get_fields_action_bar(bool $hasfieldselect = false,?bool $unused1 = null,?bool $unused2 = null)   X-Ref
Generate the output for the action bar in the field page.

param: bool $hasfieldselect Whether the field selector element should be rendered.
param: null $unused1 This parameter has been deprecated since 4.1 and should not be used anymore.
param: null $unused2 This parameter has been deprecated since 4.1 and should not be used anymore.
return: string The HTML code for the action bar.

get_fields_mapping_action_bar()   X-Ref
Generate the output for the action bar in the field mappings page.

return: string The HTML code for the action bar.

get_create_fields()   X-Ref
Generate the output for the create a new field action menu.

return: \action_menu Action menu to create a new field

get_view_action_bar(bool $hasentries, string $mode)   X-Ref
Generate the output for the action selector in the view page.

param: bool $hasentries Whether entries exist.
param: string $mode The current view mode (list, view...).
return: string The HTML code for the action selector.

get_templates_action_bar()   X-Ref
Generate the output for the action selector in the templates page.

return: string The HTML code for the action selector.

get_presets_action_bar()   X-Ref
Generate the output for the action selector in the presets page.

return: string The HTML code for the action selector.

get_presets_preview_action_bar(manager $manager, string $fullname, string $current)   X-Ref
Generate the output for the action selector in the presets preview page.

param: manager $manager the manager instance
param: string $fullname the preset fullname
param: string $current the current template name
return: string The HTML code for the action selector

get_presets_actions_select(bool $hasimport = false)   X-Ref
Helper method to get the selector for the presets action.

param: bool $hasimport Whether the Import buttons must be included or not.
return: \action_menu|null The selector object used to display the presets actions. Null when the import button is not