Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
mod_data\output\action_bar Class Reference

Public Member Functions

 __construct (int $id, moodle_url $pageurl)
 The class constructor.
 
 get_create_fields (bool $isprimarybutton=false)
 Generate the output for the create a new field action menu.
 
 get_fields_action_bar (bool $hasfieldselect=false, ?bool $unused1=null, ?bool $unused2=null)
 Generate the output for the action bar in the field page.
 
 get_fields_mapping_action_bar ()
 Generate the output for the action bar in the field mappings page.
 
 get_presets_action_bar ()
 Generate the output for the action selector in the presets page.
 
 get_presets_preview_action_bar (manager $manager, string $fullname, string $current)
 Generate the output for the action selector in the presets preview page.
 
 get_templates_action_bar ()
 Generate the output for the action selector in the templates page.
 
 get_view_action_bar (bool $hasentries, string $mode)
 Generate the output for the action selector in the view page.
 

Protected Member Functions

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

Constructor & Destructor Documentation

◆ __construct()

mod_data\output\action_bar::__construct ( int $id,
moodle_url $pageurl )

The class constructor.

Parameters
int$idThe database module id.
moodle_url$pageurlThe URL of the current page.

Member Function Documentation

◆ get_create_fields()

mod_data\output\action_bar::get_create_fields ( bool $isprimarybutton = false)

Generate the output for the create a new field action menu.

Parameters
bool$isprimarybuttonis the action trigger a primary or secondary button?
Return values
action_menuAction menu to create a new field

◆ get_fields_action_bar()

mod_data\output\action_bar::get_fields_action_bar ( bool $hasfieldselect = false,
?bool $unused1 = null,
?bool $unused2 = null )

Generate the output for the action bar in the field page.

Parameters
bool$hasfieldselectWhether the field selector element should be rendered.
null$unused1This parameter has been deprecated since 4.1 and should not be used anymore.
null$unused2This parameter has been deprecated since 4.1 and should not be used anymore.
Return values
stringThe HTML code for the action bar.

◆ get_fields_mapping_action_bar()

mod_data\output\action_bar::get_fields_mapping_action_bar ( )

Generate the output for the action bar in the field mappings page.

Return values
stringThe HTML code for the action bar.

◆ get_presets_action_bar()

mod_data\output\action_bar::get_presets_action_bar ( )

Generate the output for the action selector in the presets page.

Return values
stringThe HTML code for the action selector.

◆ get_presets_actions_select()

mod_data\output\action_bar::get_presets_actions_select ( bool $hasimport = false)
protected

Helper method to get the selector for the presets action.

Parameters
bool$hasimportWhether the Import buttons must be included or not.
Return values
action_menu|nullThe selector object used to display the presets actions. Null when the import button is not displayed and the database hasn't any fields.

◆ get_presets_preview_action_bar()

mod_data\output\action_bar::get_presets_preview_action_bar ( manager $manager,
string $fullname,
string $current )

Generate the output for the action selector in the presets preview page.

Parameters
manager$managerthe manager instance
string$fullnamethe preset fullname
string$currentthe current template name
Return values
stringThe HTML code for the action selector

◆ get_templates_action_bar()

mod_data\output\action_bar::get_templates_action_bar ( )

Generate the output for the action selector in the templates page.

Return values
stringThe HTML code for the action selector.

◆ get_view_action_bar()

mod_data\output\action_bar::get_view_action_bar ( bool $hasentries,
string $mode )

Generate the output for the action selector in the view page.

Parameters
bool$hasentriesWhether entries exist.
string$modeThe current view mode (list, view...).
Return values
stringThe HTML code for the action selector.

The documentation for this class was generated from the following file: