Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_admin_renderer Class Reference
Inheritance diagram for core_admin_renderer:
plugin_renderer_base renderer_base

Public Member Functions

 __call ($method, $arguments)
 Magic method used to pass calls otherwise meant for the standard renderer to it to ensure we don't go causing unnecessary grief.
 
 add_action_handler (component_action $action, $id=null)
 Adds a JS action for the element with the provided id.
 
 admin_notifications_page ($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb, $registered, array $cachewarnings=array(), $eventshandlers=0, $themedesignermode=false, $devlibdir=false, $mobileconfigured=false, $overridetossl=false, $invalidforgottenpasswordurl=false, $croninfrequent=false, $showcampaigncontent=false, bool $showfeedbackencouragement=false, bool $showservicesandsupport=false, $xmlrpcwarning='')
 Display the admin notifications page.
 
 cache_warnings (array $cachewarnings)
 Renders cache warnings if there are any.
 
 check_for_updates_button (\core\update\checker $checker, $reloadurl)
 Renders a button to fetch for available updates.
 
 cron_infrequent_warning (bool $croninfrequent)
 Render an appropriate message if cron is not being run frequently (recommended every minute).
 
 cron_overdue_warning ($cronoverdue)
 Render an appropriate message if cron has not been run recently.
 
 db_problems ($dbproblems)
 Render an appropriate message if there are any problems with the DB set-up.
 
 environment_check_page ($versions, $version, $envstatus, $environment_results)
 Display the plugin management page (admin/environment.php).
 
 environment_check_table ($result, $environment_results)
 This function will render one beautiful table with all the environmental configuration and how it suits Moodle needs.
 
 events_handlers ($eventshandlers)
 Renders events 1 API handlers warning.
 
 get_compact_logo_url ($maxwidth=300, $maxheight=300)
 Return the site's compact logo URL, if any.
 
 get_logo_url ($maxwidth=null, $maxheight=200)
 Return the site's logo URL, if any.
 
 has_started ()
 Returns true is output has already started, and false if not.
 
 image_url ($imagename, $component='moodle')
 Return the moodle_url for an image.
 
 install_environment_page ($maturity, $envstatus, $environment_results, $release)
 Display the 'environment check' page that is displayed during install.
 
 install_licence_page ()
 Display the 'Do you acknowledge the terms of the GPL' page.
 
 maintenance_mode_warning ($maintenancemode)
 Render an appropriate message if the site in in maintenance mode.
 
 moodleorg_registration_message ()
 Display message about the benefits of registering on Moodle.org.
 
 pix_url ($imagename, $component='moodle')
 Return the direct URL for an image from the pix folder.
 
 plugin_management_page (core_plugin_manager $pluginman, core\update\checker $checker, array $options=array())
 Display the plugin management page (admin/plugins.php).
 
 plugin_uninstall_confirm_page (core_plugin_manager $pluginman, core\plugininfo\base $pluginfo, moodle_url $continueurl, moodle_url $cancelurl)
 Display a page to confirm the plugin uninstallation.
 
 plugin_uninstall_results_page (core_plugin_manager $pluginman, core\plugininfo\base $pluginfo, progress_trace_buffer $progress)
 Display a page with results of plugin uninstallation and inform about the need to remove plugin files manually.
 
 plugin_uninstall_results_removable_page (core_plugin_manager $pluginman, core\plugininfo\base $pluginfo, progress_trace_buffer $progress, moodle_url $continueurl)
 Display a page with results of plugin uninstallation and offer removal of plugin files.
 
 plugins_check_table (core_plugin_manager $pluginman, $version, array $options=array())
 Displays all known plugins and information about their installation or upgrade.
 
 plugins_control_panel (core_plugin_manager $pluginman, array $options=array())
 Displays all known plugins and links to manage them.
 
 plugins_management_confirm_buttons (moodle_url $continue=null, moodle_url $cancel=null)
 Display the continue / cancel widgets for the plugins management pages.
 
 plugins_overview_panel (core_plugin_manager $pluginman, array $options=array())
 Prints an overview about the plugins - number of installed, number of extensions etc.
 
 render (renderable $widget)
 Renders the provided widget and returns the HTML to display it.
 
 render_from_template ($templatename, $context)
 Renders a template by name with the given context.
 
 should_display_main_logo ($headinglevel=1)
 Whether we should display the main logo.
 
 should_display_navbar_logo ()
 Whether we should display the logo in the navbar.
 
 unsatisfied_dependencies_page ($version, array $failed, moodle_url $reloadurl)
 Displays the list of plugins with unsatisfied dependencies.
 
 upgrade_confirm_abort_install_page (array $abortable, moodle_url $continue)
 Display a page to confirm plugin installation cancelation.
 
 upgrade_confirm_page ($strnewversion, $maturity, $testsite)
 Display the 'You are about to upgrade Moodle' page.
 
 upgrade_environment_page ($release, $envstatus, $environment_results)
 Display the environment page during the upgrade process.
 
 upgrade_plugin_check_page (core_plugin_manager $pluginman, core\update\checker $checker, $version, $showallplugins, $reloadurl, $continueurl)
 Display the upgrade page that lists all the plugins that require attention.
 
 upgrade_reload ($url)
 Display the reload link that appears on several upgrade/install pages.
 
 upgrade_stale_php_files_page ()
 Display page explaining proper upgrade process, there can not be any PHP file leftovers...
 
 upgradekey_form_page ($url)
 Render a simple page for providing the upgrade key.
 
 warn_if_not_registered ()
 Return an admin page warning if site is not registered with moodle.org.
 

Static Public Member Functions

static prepare_classes ($classes)
 Given an array or space-separated list of classes, prepares and returns the HTML class attribute value.
 

Protected Member Functions

 available_missing_dependencies_list (core_plugin_manager $pluginman, array $dependencies)
 Displays the list if available missing dependencies.
 
 available_updates ($updates, $fetch)
 Displays the info about available Moodle core and plugin updates.
 
 buggy_iconv_warning ($buggyiconvnomb)
 Render an appropriate message if iconv is buggy and mbstring missing.
 
 campaign_content (bool $showcampaigncontent)
 Display campaign content.
 
 development_libs_directories_warning ($devlibdir)
 Render a warning that a directory with development libs is present.
 
 display_errors_warning ($errorsdisplayed)
 Render an appropriate message if dataroot is insecure.
 
 forgotten_password_url_warning ($invalidforgottenpasswordurl)
 Display a warning about the forgotten password URL not linking to a valid URL.
 
 get_mustache ()
 Return an instance of the mustache class.
 
 info_remote_plugin_not_installable ($reason)
 Explain why core_plugin_manager::is_remote_plugin_installable() returned false.
 
 insecure_dataroot_warning ($insecuredataroot)
 Render an appropriate message if dataroot is insecure.
 
 maturity_info ($maturity)
 Display a warning about installing development code if necesary.
 
 maturity_warning ($maturity)
 Display a warning about installing development code if necesary.
 
 missing_dependencies (core_plugin_manager $pluginman)
 Displays the information about missing dependencies.
 
 mnet_deprecation_warning ($xmlrpcwarning)
 Display a warning about the deprecation of Mnet.
 
 mobile_configuration_warning ($mobileconfigured)
 Display a warning about the Mobile Web Services being disabled.
 
 moodle_available_update_info (\core\update\info $updateinfo)
 Helper method to render the information about the available Moodle update.
 
 moodle_copyright ()
 Output the copyright notice.
 
 overridetossl_warning ($overridetossl)
 Render a warning that ssl is forced because the site was on loginhttps.
 
 plugin_available_update_info (core_plugin_manager $pluginman, core\update\info $updateinfo)
 Helper method to render the information about the available plugin update.
 
 registration_warning ($registered)
 Display a warning about not being registered on Moodle.org if necesary.
 
 release_notes_link ()
 Display a link to the release notes.
 
 required_column (\core\plugininfo\base $plugin, core_plugin_manager $pluginman, $version, $branch=null)
 Formats the information that needs to go in the 'Requires' column.
 
 services_and_support_content (bool $showservicesandsupport)
 Display services and support content.
 
 test_site_warning ($testsite)
 
 themedesignermode_warning ($themedesignermode)
 Render an appropriate message if themdesignermode is enabled.
 
 userfeedback_encouragement (bool $showfeedbackencouragement)
 Display message about benefits of enabling the user feedback feature.
 
 warning ($message, $type='warning')
 Output a warning message, of the type that appears on the admin notifications page.
 

Protected Attributes

xhtml_container_stack $opencontainers
 The xhtml_container_stack to use.
 
renderer_base core_renderer $output
 A reference to the current renderer.
 
moodle_page $page
 The Moodle page the renderer has been created to assist with.
 
string $target
 The requested rendering target.
 
array $templatecache = []
 $templatecache The mustache template cache.
 

Member Function Documentation

◆ __call()

plugin_renderer_base::__call ( $method,
$arguments )
inherited

Magic method used to pass calls otherwise meant for the standard renderer to it to ensure we don't go causing unnecessary grief.

Parameters
string$method
array$arguments
Return values
mixed

◆ add_action_handler()

renderer_base::add_action_handler ( component_action $action,
$id = null )
inherited

Adds a JS action for the element with the provided id.

This method adds a JS event for the provided component action to the page and then returns the id that the event has been attached to. If no id has been provided then a new ID is generated by html_writer::random_id()

Parameters
component_action$action
string$id
Return values
stringid of element, either original submitted or random new if not supplied

◆ admin_notifications_page()

core_admin_renderer::admin_notifications_page ( $maturity,
$insecuredataroot,
$errorsdisplayed,
$cronoverdue,
$dbproblems,
$maintenancemode,
$availableupdates,
$availableupdatesfetch,
$buggyiconvnomb,
$registered,
array $cachewarnings = array(),
$eventshandlers = 0,
$themedesignermode = false,
$devlibdir = false,
$mobileconfigured = false,
$overridetossl = false,
$invalidforgottenpasswordurl = false,
$croninfrequent = false,
$showcampaigncontent = false,
bool $showfeedbackencouragement = false,
bool $showservicesandsupport = false,
$xmlrpcwarning = '' )

Display the admin notifications page.

Parameters
int$maturity
bool$insecuredatarootwarn dataroot is invalid
bool$errorsdisplayedwarn invalid dispaly error setting
bool$cronoverduewarn cron not running
bool$dbproblemswarn db has problems
bool$maintenancemodewarn in maintenance mode
bool$buggyiconvnombwarn iconv problems
array | null$availableupdatesarray of core\update\info objects or null
int | null$availableupdatesfetchtimestamp of the most recent updates fetch or null (unknown)
string[]$cachewarningsAn array containing warnings from the Cache API.
array$eventshandlersEvents 1 API handlers.
bool$themedesignermodeWarn about the theme designer mode.
bool$devlibdirWarn about development libs directory presence.
bool$mobileconfiguredWhether the mobile web services have been enabled
bool$overridetosslWhether or not ssl is being forced.
bool$invalidforgottenpasswordurlWhether the forgotten password URL does not link to a valid URL.
bool$croninfrequentIf true, warn that cron hasn't run in the past few minutes
bool$showcampaigncontentWhether the campaign content should be visible or not.
bool$showfeedbackencouragementWhether the feedback encouragement content should be displayed or not.
bool$showservicesandsupportWhether the services and support content should be displayed or not.
string$xmlrpcwarningXML-RPC deprecation warning message.
Return values
stringHTML to output.

◆ available_missing_dependencies_list()

core_admin_renderer::available_missing_dependencies_list ( core_plugin_manager $pluginman,
array $dependencies )
protected

Displays the list if available missing dependencies.

Parameters
core_plugin_manager$pluginman
array$dependencies
Return values
string

◆ available_updates()

core_admin_renderer::available_updates ( $updates,
$fetch )
protected

Displays the info about available Moodle core and plugin updates.

The structure of the $updates param has changed since 2.4. It contains not only updates for the core itself, but also for all other installed plugins.

Parameters
array | null$updatesarray of (string)component => array of core\update\info objects or null
int | null$fetchtimestamp of the most recent updates fetch or null (unknown)
Return values
string

◆ buggy_iconv_warning()

core_admin_renderer::buggy_iconv_warning ( $buggyiconvnomb)
protected

Render an appropriate message if iconv is buggy and mbstring missing.

Parameters
bool$buggyiconvnomb
Return values
stringHTML to output.

◆ cache_warnings()

core_admin_renderer::cache_warnings ( array $cachewarnings)

Renders cache warnings if there are any.

Parameters
string[]$cachewarnings
Return values
string

◆ campaign_content()

core_admin_renderer::campaign_content ( bool $showcampaigncontent)
protected

Display campaign content.

Parameters
bool$showcampaigncontentWhether the campaign content should be visible or not.
Return values
stringthe campaign content raw html.

◆ check_for_updates_button()

core_admin_renderer::check_for_updates_button ( \core\update\checker $checker,
$reloadurl )

Renders a button to fetch for available updates.

Parameters
core\update\checker$checker
moodle_url$reloadurl
Return values
stringHTML

◆ cron_infrequent_warning()

core_admin_renderer::cron_infrequent_warning ( bool $croninfrequent)

Render an appropriate message if cron is not being run frequently (recommended every minute).

Parameters
bool$croninfrequent
Return values
stringHTML to output.

◆ cron_overdue_warning()

core_admin_renderer::cron_overdue_warning ( $cronoverdue)

Render an appropriate message if cron has not been run recently.

Parameters
bool$cronoverdue
Return values
stringHTML to output.

◆ db_problems()

core_admin_renderer::db_problems ( $dbproblems)

Render an appropriate message if there are any problems with the DB set-up.

Parameters
bool$dbproblems
Return values
stringHTML to output.

◆ development_libs_directories_warning()

core_admin_renderer::development_libs_directories_warning ( $devlibdir)
protected

Render a warning that a directory with development libs is present.

Parameters
bool$devlibdirTrue if the warning should be displayed.
Return values
string

◆ display_errors_warning()

core_admin_renderer::display_errors_warning ( $errorsdisplayed)
protected

Render an appropriate message if dataroot is insecure.

Parameters
bool$errorsdisplayed
Return values
stringHTML to output.

◆ environment_check_page()

core_admin_renderer::environment_check_page ( $versions,
$version,
$envstatus,
$environment_results )

Display the plugin management page (admin/environment.php).

Parameters
array$versions
string$version
boolean$envstatusfinal result of env check (true/false)
array$environment_resultsarray of results gathered
Return values
stringHTML to output.

◆ environment_check_table()

core_admin_renderer::environment_check_table ( $result,
$environment_results )

This function will render one beautiful table with all the environmental configuration and how it suits Moodle needs.

Parameters
boolean$resultfinal result of the check (true/false)
environment_results[]$environment_resultsarray of results gathered
Return values
stringHTML to output.

◆ events_handlers()

core_admin_renderer::events_handlers ( $eventshandlers)

Renders events 1 API handlers warning.

Parameters
array$eventshandlers
Return values
string

◆ forgotten_password_url_warning()

core_admin_renderer::forgotten_password_url_warning ( $invalidforgottenpasswordurl)
protected

Display a warning about the forgotten password URL not linking to a valid URL.

Parameters
boolean$invalidforgottenpasswordurltrue if the forgotten password URL is not valid
Return values
stringHTML to output.

◆ get_compact_logo_url()

renderer_base::get_compact_logo_url ( $maxwidth = 300,
$maxheight = 300 )
inherited

Return the site's compact logo URL, if any.

Parameters
int$maxwidthThe maximum width, or null when the maximum width does not matter.
int$maxheightThe maximum height, or null when the maximum height does not matter.
Return values
moodle_url|false

◆ get_logo_url()

renderer_base::get_logo_url ( $maxwidth = null,
$maxheight = 200 )
inherited

Return the site's logo URL, if any.

Parameters
int$maxwidthThe maximum width, or null when the maximum width does not matter.
int$maxheightThe maximum height, or null when the maximum height does not matter.
Return values
moodle_url|false

◆ get_mustache()

renderer_base::get_mustache ( )
protectedinherited

Return an instance of the mustache class.

Since
2.9
Return values
Mustache_Engine

◆ has_started()

renderer_base::has_started ( )
inherited

Returns true is output has already started, and false if not.

Return values
booleantrue if the header has been printed.

◆ image_url()

renderer_base::image_url ( $imagename,
$component = 'moodle' )
inherited

Return the moodle_url for an image.

The exact image location and extension is determined automatically by searching for gif|png|jpg|jpeg, please note there can not be diferent images with the different extension. The imagename is for historical reasons a relative path name, it may be changed later for core images. It is recommended to not use subdirectories in plugin and theme pix directories.

There are three types of images: 1/ theme images - stored in theme/mytheme/pix/, use component 'theme' 2/ core images - stored in /pix/, overridden via theme/mytheme/pix_core/ 3/ plugin images - stored in mod/mymodule/pix, overridden via theme/mytheme/pix_plugins/mod/mymodule/, example: image_url('comment', 'mod_glossary')

Parameters
string$imagenamethe pathname of the image
string$componentfull plugin name (aka component) or 'theme'
Return values
moodle_url

◆ info_remote_plugin_not_installable()

core_admin_renderer::info_remote_plugin_not_installable ( $reason)
protected

Explain why core_plugin_manager::is_remote_plugin_installable() returned false.

Parameters
string$reasonthe reason code as returned by the plugin manager
Return values
string

◆ insecure_dataroot_warning()

core_admin_renderer::insecure_dataroot_warning ( $insecuredataroot)
protected

Render an appropriate message if dataroot is insecure.

Parameters
bool$insecuredataroot
Return values
stringHTML to output.

◆ install_environment_page()

core_admin_renderer::install_environment_page ( $maturity,
$envstatus,
$environment_results,
$release )

Display the 'environment check' page that is displayed during install.

Parameters
int$maturity
boolean$envstatusfinal result of the check (true/false)
array$environment_resultsarray of results gathered
string$releasemoodle release
Return values
stringHTML to output.

◆ install_licence_page()

core_admin_renderer::install_licence_page ( )

Display the 'Do you acknowledge the terms of the GPL' page.

The first page during install.

Return values
stringHTML to output.

◆ maintenance_mode_warning()

core_admin_renderer::maintenance_mode_warning ( $maintenancemode)

Render an appropriate message if the site in in maintenance mode.

Parameters
bool$maintenancemode
Return values
stringHTML to output.

◆ maturity_info()

core_admin_renderer::maturity_info ( $maturity)
protected

Display a warning about installing development code if necesary.

Parameters
int$maturity
Return values
stringHTML to output.

◆ maturity_warning()

core_admin_renderer::maturity_warning ( $maturity)
protected

Display a warning about installing development code if necesary.

Parameters
int$maturity
Return values
stringHTML to output.

◆ missing_dependencies()

core_admin_renderer::missing_dependencies ( core_plugin_manager $pluginman)
protected

Displays the information about missing dependencies.

Parameters
core_plugin_manager$pluginman
Return values
string

◆ mnet_deprecation_warning()

core_admin_renderer::mnet_deprecation_warning ( $xmlrpcwarning)
protected

Display a warning about the deprecation of Mnet.

Parameters
string$xmlrpcwarningThe warning message
Return values
stringHTML to output.

◆ mobile_configuration_warning()

core_admin_renderer::mobile_configuration_warning ( $mobileconfigured)
protected

Display a warning about the Mobile Web Services being disabled.

Parameters
boolean$mobileconfiguredtrue if mobile web services are enabled
Return values
stringHTML to output.

◆ moodle_available_update_info()

core_admin_renderer::moodle_available_update_info ( \core\update\info $updateinfo)
protected

Helper method to render the information about the available Moodle update.

Parameters
core\update\info$updateinfoinformation about the available Moodle core update

◆ moodle_copyright()

core_admin_renderer::moodle_copyright ( )
protected

Output the copyright notice.

Return values
stringHTML to output.

◆ moodleorg_registration_message()

core_admin_renderer::moodleorg_registration_message ( )

Display message about the benefits of registering on Moodle.org.

Return values
string

◆ overridetossl_warning()

core_admin_renderer::overridetossl_warning ( $overridetossl)
protected

Render a warning that ssl is forced because the site was on loginhttps.

Parameters
bool$overridetosslWhether or not ssl is being forced.
Return values
string

◆ pix_url()

renderer_base::pix_url ( $imagename,
$component = 'moodle' )
inherited

Return the direct URL for an image from the pix folder.

Use this function sparingly and never for icons. For icons use pix_icon or the pix helper in a mustache template.

Deprecated
since Moodle 3.3
Parameters
string$imagenamethe name of the icon.
string$componentspecification of one plugin like in get_string()
Return values
moodle_url

◆ plugin_available_update_info()

core_admin_renderer::plugin_available_update_info ( core_plugin_manager $pluginman,
core\update\info $updateinfo )
protected

Helper method to render the information about the available plugin update.

Parameters
core_plugin_manager$pluginmanplugin manager instance
core\update\info$updateinfoinformation about the available update for the plugin

◆ plugin_management_page()

core_admin_renderer::plugin_management_page ( core_plugin_manager $pluginman,
core\update\checker $checker,
array $options = array() )

Display the plugin management page (admin/plugins.php).

The filtering options array may contain following items: bool contribonly - show only contributed extensions bool updatesonly - show only plugins with an available update

Parameters
core_plugin_manager$pluginman
core\update\checker$checker
array$optionsfiltering options
Return values
stringHTML to output.

◆ plugin_uninstall_confirm_page()

core_admin_renderer::plugin_uninstall_confirm_page ( core_plugin_manager $pluginman,
core\plugininfo\base $pluginfo,
moodle_url $continueurl,
moodle_url $cancelurl )

Display a page to confirm the plugin uninstallation.

Parameters
core_plugin_manager$pluginman
core\plugininfo\base$pluginfo
moodle_url$continueurlURL to continue after confirmation
moodle_url$cancelurlURL to to go if cancelled
Return values
string

◆ plugin_uninstall_results_page()

core_admin_renderer::plugin_uninstall_results_page ( core_plugin_manager $pluginman,
core\plugininfo\base $pluginfo,
progress_trace_buffer $progress )

Display a page with results of plugin uninstallation and inform about the need to remove plugin files manually.

Parameters
core_plugin_manager$pluginman
core\plugininfo\base$pluginfo
progress_trace_buffer$progress
Return values
string

◆ plugin_uninstall_results_removable_page()

core_admin_renderer::plugin_uninstall_results_removable_page ( core_plugin_manager $pluginman,
core\plugininfo\base $pluginfo,
progress_trace_buffer $progress,
moodle_url $continueurl )

Display a page with results of plugin uninstallation and offer removal of plugin files.

Parameters
core_plugin_manager$pluginman
core\plugininfo\base$pluginfo
progress_trace_buffer$progress
moodle_url$continueurlURL to continue to remove the plugin folder
Return values
string

◆ plugins_check_table()

core_admin_renderer::plugins_check_table ( core_plugin_manager $pluginman,
$version,
array $options = array() )

Displays all known plugins and information about their installation or upgrade.

This default implementation renders all plugins into one big table. The rendering options support: (bool)full = false: whether to display up-to-date plugins, too (bool)xdep = false: display the plugins with unsatisified dependecies only

Parameters
core_plugin_manager$pluginmanprovides information about the plugins.
int$versionthe version of the Moodle code from version.php.
array$optionsrendering options
Return values
stringHTML code

◆ plugins_control_panel()

core_admin_renderer::plugins_control_panel ( core_plugin_manager $pluginman,
array $options = array() )

Displays all known plugins and links to manage them.

This default implementation renders all plugins into one big table.

Parameters
core_plugin_manager$pluginmanprovides information about the plugins.
array$optionsfiltering options
Return values
stringHTML code

◆ plugins_management_confirm_buttons()

core_admin_renderer::plugins_management_confirm_buttons ( moodle_url $continue = null,
moodle_url $cancel = null )

Display the continue / cancel widgets for the plugins management pages.

Parameters
null | moodle_url$continueURL for the continue button, should it be displayed
null | moodle_url$cancelURL for the cancel link, defaults to the current page
Return values
stringHTML

◆ plugins_overview_panel()

core_admin_renderer::plugins_overview_panel ( core_plugin_manager $pluginman,
array $options = array() )

Prints an overview about the plugins - number of installed, number of extensions etc.

Parameters
core_plugin_manager$pluginmanprovides information about the plugins
array$optionsfiltering options
Return values
stringas usually

◆ prepare_classes()

static renderer_base::prepare_classes ( $classes)
staticinherited

Given an array or space-separated list of classes, prepares and returns the HTML class attribute value.

Parameters
mixed$classesSpace-separated string or array of classes
Return values
stringHTML class attribute value

◆ registration_warning()

core_admin_renderer::registration_warning ( $registered)
protected

Display a warning about not being registered on Moodle.org if necesary.

Parameters
boolean$registeredtrue if the site is registered on Moodle.org
Return values
stringHTML to output.

◆ release_notes_link()

core_admin_renderer::release_notes_link ( )
protected

Display a link to the release notes.

Return values
stringHTML to output.

◆ render()

plugin_renderer_base::render ( renderable $widget)
inherited

Renders the provided widget and returns the HTML to display it.

Parameters
renderable$widgetinstance with renderable interface
Return values
string

Reimplemented from renderer_base.

Reimplemented in core_courseformat\output\section_renderer, and tool_policy\output\renderer.

◆ render_from_template()

renderer_base::render_from_template ( $templatename,
$context )
inherited

Renders a template by name with the given context.

The provided data needs to be array/stdClass made up of only simple types. Simple types are array,stdClass,bool,int,float,string

Since
2.9
Parameters
array | stdClass$contextContext containing data for the template.
Return values
string|boolean

◆ required_column()

core_admin_renderer::required_column ( \core\plugininfo\base $plugin,
core_plugin_manager $pluginman,
$version,
$branch = null )
protected

Formats the information that needs to go in the 'Requires' column.

Parameters
core\plugininfo\base$pluginthe plugin we are rendering the row for.
core_plugin_manager$pluginmanprovides data on all the plugins.
string$version
int$branchthe current Moodle branch
Return values
stringHTML code

◆ services_and_support_content()

core_admin_renderer::services_and_support_content ( bool $showservicesandsupport)
protected

Display services and support content.

Parameters
bool$showservicesandsupportWhether the services and support content should be visible or not.
Return values
stringthe campaign content raw html.

◆ should_display_main_logo()

renderer_base::should_display_main_logo ( $headinglevel = 1)
inherited

Whether we should display the main logo.

Deprecated
since Moodle 4.0
Todo
final deprecation. To be removed in Moodle 4.4 MDL-73165.
Parameters
int$headinglevelThe heading level we want to check against.
Return values
bool

◆ should_display_navbar_logo()

renderer_base::should_display_navbar_logo ( )
inherited

Whether we should display the logo in the navbar.

We will when there are no main logos, and we have compact logo.

Return values
bool

◆ themedesignermode_warning()

core_admin_renderer::themedesignermode_warning ( $themedesignermode)
protected

Render an appropriate message if themdesignermode is enabled.

Parameters
bool$themedesignermodetrue if enabled
Return values
stringHTML to output.

◆ unsatisfied_dependencies_page()

core_admin_renderer::unsatisfied_dependencies_page ( $version,
array $failed,
moodle_url $reloadurl )

Displays the list of plugins with unsatisfied dependencies.

Parameters
double | string | int$versionMoodle on-disk version
array$failedlist of plugins with unsatisfied dependecies
moodle_url$reloadurlURL of the page to recheck the dependencies
Return values
stringHTML

◆ upgrade_confirm_abort_install_page()

core_admin_renderer::upgrade_confirm_abort_install_page ( array $abortable,
moodle_url $continue )

Display a page to confirm plugin installation cancelation.

Parameters
array$abortablelist of core\update\plugininfo
moodle_url$continue
Return values
string

◆ upgrade_confirm_page()

core_admin_renderer::upgrade_confirm_page ( $strnewversion,
$maturity,
$testsite )

Display the 'You are about to upgrade Moodle' page.

The first page during upgrade.

Parameters
string$strnewversion
int$maturity
string$testsite
Return values
stringHTML to output.

◆ upgrade_environment_page()

core_admin_renderer::upgrade_environment_page ( $release,
$envstatus,
$environment_results )

Display the environment page during the upgrade process.

Parameters
string$release
boolean$envstatusfinal result of env check (true/false)
array$environment_resultsarray of results gathered
Return values
stringHTML to output.

◆ upgrade_plugin_check_page()

core_admin_renderer::upgrade_plugin_check_page ( core_plugin_manager $pluginman,
core\update\checker $checker,
$version,
$showallplugins,
$reloadurl,
$continueurl )

Display the upgrade page that lists all the plugins that require attention.

Parameters
core_plugin_manager$pluginmanprovides information about the plugins.
core\update\checker$checkerprovides information about available updates.
int$versionthe version of the Moodle code from version.php.
bool$showallplugins
moodle_url$reloadurl
moodle_url$continueurl
Return values
stringHTML to output.

◆ upgrade_reload()

core_admin_renderer::upgrade_reload ( $url)

Display the reload link that appears on several upgrade/install pages.

Return values
stringHTML to output.

◆ upgrade_stale_php_files_page()

core_admin_renderer::upgrade_stale_php_files_page ( )

Display page explaining proper upgrade process, there can not be any PHP file leftovers...

Return values
stringHTML to output.

◆ upgradekey_form_page()

core_admin_renderer::upgradekey_form_page ( $url)

Render a simple page for providing the upgrade key.

Parameters
moodle_url | string$url
Return values
string

◆ userfeedback_encouragement()

core_admin_renderer::userfeedback_encouragement ( bool $showfeedbackencouragement)
protected

Display message about benefits of enabling the user feedback feature.

Parameters
bool$showfeedbackencouragementWhether the encouragement content should be displayed or not
Return values
string

◆ warn_if_not_registered()

core_admin_renderer::warn_if_not_registered ( )

Return an admin page warning if site is not registered with moodle.org.

Return values
string

◆ warning()

core_admin_renderer::warning ( $message,
$type = 'warning' )
protected

Output a warning message, of the type that appears on the admin notifications page.

Parameters
string$messagethe message to display.
string$typetype class
Return values
stringHTML to output.

Member Data Documentation

◆ $output

renderer_base core_renderer plugin_renderer_base::$output
protectedinherited

A reference to the current renderer.

The renderer provided here will be determined by the page but will in 90% of cases by the core_renderer


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