Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
theme_classic

Namespaces

namespace  theme_classic\output
  
 
namespace  theme_classic\privacy
  
 

Classes

class  behat_theme_classic_behat_admin
 Site administration level steps definitions overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_blocks
 Blocks management step definitions for the Classic theme. More...
 
class  behat_theme_classic_behat_completion
 
class  behat_theme_classic_behat_core_question
 
class  behat_theme_classic_behat_course
 Course-related step definition overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_general
 
class  behat_theme_classic_behat_grade
 Behat grade overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_grading
 
class  behat_theme_classic_behat_navigation
 Step definitions and overrides to navigate through the navigation tree nodes in the Classic theme. More...
 
class  behat_theme_classic_behat_repository_upload
 Override step definitions to deal with the upload repository in the Classic theme. More...
 
class  theme_classic\output\core_renderer
 Renderers to align Moodle's HTML with that expected by Bootstrap. More...
 
class  theme_classic\output\icon_system_fontawesome
 Class overriding some of the Moodle default FontAwesome icons. More...
 
class  theme_classic\privacy\provider
 The classic theme does not store any data. More...
 

Functions

 find_header_administration_menu ($mustexist=false)
 Locates the administration menu in the <header> element and returns its xpath.
 
 find_page_administration_menu ($mustexist=false)
 Locate the administration menu on the page (but not in the header) and return its xpath.
 
 i_turn_editing_mode_off ()
 Turns editing mode off.
 
 i_turn_editing_mode_on ()
 Turns editing mode on.
 
 page_administration_does_not_exist ()
 Check that the page administration menu does not exist on the page.
 
 page_administration_exists ()
 Check that the page administration menu exists on the page.
 
 select_from_administration_menu ($nodelist)
 Finds a page edit cog and select an item from it.
 
 select_on_administration_page ($nodelist)
 Finds and clicks a link on the admin page (site administration or course administration)
 
 should_not_exist_in_current_page_administration ($element, $selectortype)
 Check that current page administration does not contains an element.
 
 theme_classic_get_extra_scss ($theme)
 Inject additional SCSS.
 
 theme_classic_get_main_scss_content ($theme)
 Returns the main SCSS content.
 
 theme_classic_get_pre_scss ($theme)
 Get SCSS to prepend.
 
 theme_classic_get_precompiled_css ()
 Get compiled css.
 
 theme_classic_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 Serves any files associated with the theme settings.
 
 toggle_page_administration_menu ($menuxpath=null)
 Toggles administration menu.
 

Variables

 $blockspost = $OUTPUT->blocks('side-post')
 
 $blockspost = $OUTPUT->blocks('side-post')
 
 $blockspre = $OUTPUT->blocks('side-pre')
 
 $blockspre = $OUTPUT->blocks('side-pre')
 
 $bodyattributes = $OUTPUT->body_attributes()
 
 $bodyattributes = $OUTPUT->body_attributes([])
 
 $bodyattributes = $OUTPUT->body_attributes()
 
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT)
 
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT)
 
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT)
 
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT)
 
 $header = $PAGE->activityheader
 
 $headercontent = $header->export_for_template($renderer)
 
 $plugin = 2024041600
 
 $renderer = $PAGE->get_renderer('core')
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
$plugin component = 'theme_classic'
 
$plugin dependencies = ['theme_boost' => 2024041600]
 
$THEME editor_sheets = []
 
$THEME enable_dock = false
 
$THEME extrascsscallback = 'theme_classic_get_extra_scss'
 
$THEME haseditswitch = false
 
$THEME iconsystem = '\\theme_classic\\output\\icon_system_fontawesome'
 
 if (empty( $PAGE->layout_options[ 'noactivityheader']))
 
$THEME layouts
 
$THEME name = 'classic'
 
$THEME parents = ['boost']
 
$THEME precompiledcsscallback = 'theme_classic_get_precompiled_css'
 
$THEME prescsscallback = 'theme_classic_get_pre_scss'
 
$THEME rendererfactory = 'theme_overridden_renderer_factory'
 
$THEME scss
 
$THEME sheets = []
 
$THEME usefallback = true
 
$plugin version = 2024042200
 
$THEME yuicssmodules = array()
 

Detailed Description

Function Documentation

◆ find_header_administration_menu()

find_header_administration_menu ( $mustexist = false)
protected

Locates the administration menu in the <header> element and returns its xpath.

Parameters
bool$mustexistif specified throws an exception if menu is not found
Return values
null|string

◆ find_page_administration_menu()

find_page_administration_menu ( $mustexist = false)
protected

Locate the administration menu on the page (but not in the header) and return its xpath.

Exceptions
ElementNotFoundException
Parameters
bool$mustexistIf true, throws an exception if menu is not found
Return values
null|string

◆ page_administration_does_not_exist()

page_administration_does_not_exist ( )

Check that the page administration menu does not exist on the page.

This confirms the absence of the menu, which unauthorised users should not have access to. @Given /^I should not see the page administration menu$/

Exceptions
ExpectationException
Return values
void

◆ page_administration_exists()

page_administration_exists ( )

Check that the page administration menu exists on the page.

This confirms the existence of the menu, which authorised users should have access to. @Given /^I should see the page administration menu$/

Exceptions
ExpectationException
Return values
void

◆ select_from_administration_menu()

select_from_administration_menu ( $nodelist)
protected

Finds a page edit cog and select an item from it.

If the page edit cog is in the page header and the item is not found there, click "More..." link and find the item on the course/frontpage administration page

Parameters
array$nodelist
Exceptions
ElementNotFoundException

◆ select_on_administration_page()

select_on_administration_page ( $nodelist)
protected

Finds and clicks a link on the admin page (site administration or course administration)

Parameters
array$nodelist

◆ should_not_exist_in_current_page_administration()

should_not_exist_in_current_page_administration ( $element,
$selectortype )

Check that current page administration does not contains an element.

Exceptions
ExpectationException
Parameters
string$elementThe locator of the specified selector. This may be a path, for example "Subscription mode > Forced subscription"
string$selectortypeThe selector type (link or text)
Return values
void

◆ theme_classic_get_extra_scss()

theme_classic_get_extra_scss ( $theme)

Inject additional SCSS.

Parameters
theme_config$themeThe theme config object.
Return values
string

◆ theme_classic_get_main_scss_content()

theme_classic_get_main_scss_content ( $theme)

Returns the main SCSS content.

Parameters
theme_config$themeThe theme config object.
Return values
string

◆ theme_classic_get_pre_scss()

theme_classic_get_pre_scss ( $theme)

Get SCSS to prepend.

Parameters
theme_config$themeThe theme config object.
Return values
array

◆ theme_classic_get_precompiled_css()

theme_classic_get_precompiled_css ( )

Get compiled css.

Return values
stringcompiled css

◆ theme_classic_pluginfile()

theme_classic_pluginfile ( $course,
$cm,
$context,
$filearea,
$args,
$forcedownload,
array $options = array() )

Serves any files associated with the theme settings.

Parameters
stdClass$course
stdClass$cm
context$context
string$filearea
array$args
bool$forcedownload
array$options
Return values
bool

◆ toggle_page_administration_menu()

toggle_page_administration_menu ( $menuxpath = null)
protected

Toggles administration menu.

Parameters
string$menuxpath(optional) xpath to the page administration menu if already known

Variable Documentation

◆ $templatecontext [1/3]

$templatecontext
Initial value:
= [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'sidepreblocks' => $blockspre,
'sidepostblocks' => $blockspost,
'haspreblocks' => $hassidepre,
'haspostblocks' => $hassidepost,
'bodyattributes' => $bodyattributes,
'headercontent' => $headercontent,
]
format_string($string, $striplinks=true, $options=null)
Given a simple string, this function returns the string processed by enabled string filters if $CFG->...
Definition weblib.php:1501

◆ $templatecontext [2/3]

$templatecontext
Initial value:
= [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes
]

◆ $templatecontext [3/3]

$templatecontext
Initial value:
= [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'sidepreblocks' => $blockspre,
'sidepostblocks' => $blockspost,
'haspreblocks' => $hassidepre,
'haspostblocks' => $hassidepost,
'bodyattributes' => $bodyattributes
]

◆ scss

$THEME scss
Initial value:
= function($theme) {
}
theme_classic_get_main_scss_content($theme)
Returns the main SCSS content.
Definition lib.php:34