Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
theme_boost

Namespaces

namespace  theme_boost
  
 
namespace  theme_boost\output
  
 
namespace  theme_boost\privacy
  
 

Classes

class  behat_theme_boost_behat_navigation
 
class  theme_boost\autoprefixer
 Autoprefixer class. More...
 
class  theme_boost\boostnavbar
 
class  theme_boost\output\core_renderer
 
class  theme_boost\privacy\provider
 The boost theme stores a user preference data. More...
 
class  theme_boost_admin_settingspage_tabs
 

Functions

 theme_boost_css_tree_post_processor ($tree, $theme)
 Post process the CSS tree.
 
 theme_boost_get_extra_scss ($theme)
 Inject additional SCSS.
 
 theme_boost_get_main_scss_content ($theme)
 Returns the main SCSS content.
 
 theme_boost_get_pre_scss ($theme)
 Get SCSS to prepend.
 
 theme_boost_get_precompiled_css ()
 Get compiled css.
 
 theme_boost_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 Serves any files associated with the theme settings.
 
 theme_boost_user_preferences ()
 Get the current user preferences that are available.
 

Variables

 $addblockbutton = $OUTPUT->addblockbutton()
 
 $addblockbutton = $OUTPUT->addblockbutton()
 
 $blockdraweropen = false
 
 $blockshtml = $OUTPUT->blocks('side-pre')
 
if($courseindexopen) $blockshtml = $OUTPUT->blocks('side-pre')
 
 $blockshtml = $OUTPUT->blocks('side-pre')
 
 $bodyattributes = $OUTPUT->body_attributes([])
 
 $bodyattributes = $OUTPUT->body_attributes($extraclasses)
 
if(! $courseindex) $bodyattributes = $OUTPUT->body_attributes($extraclasses)
 
 $bodyattributes = $OUTPUT->body_attributes()
 
 $bodyattributes = $OUTPUT->body_attributes()
 
 $buildregionmainsettings = !$PAGE->include_region_main_settings_in_header_actions() && !$PAGE->has_secondary_navigation()
 
 $buildregionmainsettings = !$PAGE->include_region_main_settings_in_header_actions() && !$PAGE->has_secondary_navigation()
 
if(! $hasblocks) $courseindex = core_course_drawer()
 
 $extraclasses = []
 
if(defined('BEHAT_SITE_RUNNING') &&get_user_preferences('behat_keep_drawer_closed') !=1) $extraclasses = ['uses-drawers']
 
 $fakeblockshtml = $OUTPUT->blocks('side-pre', array(), 'aside', true)
 
 $forceblockdraweropen = $OUTPUT->firstview_fakeblocks()
 
 $hasblocks = (strpos($blockshtml, 'data-block=') !== false || !empty($addblockbutton))
 
 $hasblocks = (strpos($blockshtml, 'data-block=') !== false || !empty($addblockbutton))
 
 $hasblocks = strpos($blockshtml, 'data-block=') !== false
 
 $hasfakeblocks = strpos($fakeblockshtml, 'data-block="_fake"') !== false
 
 $header = $PAGE->activityheader
 
 $header = $PAGE->activityheader
 
 $headercontent = $header->export_for_template($renderer)
 
 $headercontent = $header->export_for_template($renderer)
 
 $overflow = ''
 
 $overflow = ''
 
 $plugin = 2023100400
 
if($PAGE->has_secondary_navigation()) $primary = new core\navigation\output\primary($PAGE)
 
if($PAGE->has_secondary_navigation()) $primary = new core\navigation\output\primary($PAGE)
 
 $primarymenu = $primary->export_for_template($renderer)
 
 $primarymenu = $primary->export_for_template($renderer)
 
 $regionmainsettingsmenu = $buildregionmainsettings ? $OUTPUT->region_main_settings_menu() : false
 
 $regionmainsettingsmenu = $buildregionmainsettings ? $OUTPUT->region_main_settings_menu() : false
 
 $renderer = $PAGE->get_renderer('core')
 
 $renderer = $PAGE->get_renderer('core')
 
 $renderer = $PAGE->get_renderer('core')
 
 $secondarynavigation = false
 
 $secondarynavigation = false
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
 $templatecontext
 
$THEME activityheaderconfig
 
$THEME addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV
 
$plugin component = 'theme_boost'
 
$THEME editor_scss = ['editor']
 
$THEME editor_sheets = []
 
if(isloggedin()) else
 
$THEME enable_dock = false
 
$THEME extrascsscallback = 'theme_boost_get_extra_scss'
 
$THEME haseditswitch = true
 
$THEME iconsystem = core\output\icon_system::FONTAWESOME
 
 if (empty( $PAGE->layout_options[ 'noactivityheader']))
 
$THEME layouts
 
$THEME name = 'boost'
 
$THEME parents = []
 
$THEME precompiledcsscallback = 'theme_boost_get_precompiled_css'
 
$THEME prescsscallback = 'theme_boost_get_pre_scss'
 
$THEME rendererfactory = 'theme_overridden_renderer_factory'
 
$THEME requiredblocks = ''
 
$THEME scss
 
$THEME sheets = []
 
$THEME usefallback = true
 
$THEME usescourseindex = true
 
$plugin version = 2023100900
 
$THEME yuicssmodules = array()
 

Detailed Description

Function Documentation

◆ theme_boost_css_tree_post_processor()

theme_boost_css_tree_post_processor ( $tree,
$theme )

Post process the CSS tree.

Parameters
string$treeThe CSS tree.
theme_config$themeThe theme config object.

◆ theme_boost_get_extra_scss()

theme_boost_get_extra_scss ( $theme)

Inject additional SCSS.

Parameters
theme_config$themeThe theme config object.
Return values
string

◆ theme_boost_get_main_scss_content()

theme_boost_get_main_scss_content ( $theme)

Returns the main SCSS content.

Parameters
theme_config$themeThe theme config object.
Return values
string

◆ theme_boost_get_pre_scss()

theme_boost_get_pre_scss ( $theme)

Get SCSS to prepend.

Parameters
theme_config$themeThe theme config object.
Return values
string

◆ theme_boost_get_precompiled_css()

theme_boost_get_precompiled_css ( )

Get compiled css.

Return values
stringcompiled css

◆ theme_boost_pluginfile()

theme_boost_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

◆ theme_boost_user_preferences()

theme_boost_user_preferences ( )

Get the current user preferences that are available.

Return values
array[]

Variable Documentation

◆ $templatecontext [1/7]

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

◆ $templatecontext [2/7]

$templatecontext
Initial value:
= [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'sidepreblocks' => $blockshtml,
'hasblocks' => $hasblocks,
'bodyattributes' => $bodyattributes,
'primarymoremenu' => $primarymenu['moremenu'],
'secondarymoremenu' => $secondarynavigation ?: false,
'mobileprimarynav' => $primarymenu['mobileprimarynav'],
'usermenu' => $primarymenu['user'],
'langmenu' => $primarymenu['lang'],
'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
'headercontent' => $headercontent,
'overflow' => $overflow,
'addblockbutton' => $addblockbutton,
]

◆ $templatecontext [3/7]

$templatecontext
Initial value:
= [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'sidepreblocks' => $blockshtml,
'hasblocks' => $hasblocks,
'bodyattributes' => $bodyattributes,
'courseindexopen' => $courseindexopen,
'blockdraweropen' => $blockdraweropen,
'courseindex' => $courseindex,
'primarymoremenu' => $primarymenu['moremenu'],
'secondarymoremenu' => $secondarynavigation ?: false,
'mobileprimarynav' => $primarymenu['mobileprimarynav'],
'usermenu' => $primarymenu['user'],
'langmenu' => $primarymenu['lang'],
'forceblockdraweropen' => $forceblockdraweropen,
'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
'overflow' => $overflow,
'headercontent' => $headercontent,
'addblockbutton' => $addblockbutton
]

◆ $templatecontext [4/7]

$templatecontext
Initial value:
= [
'output' => $OUTPUT,
'headercontent' => $PAGE->activityheader->export_for_template($renderer),
'hasfakeblocks' => $hasfakeblocks,
'fakeblocks' => $fakeblockshtml,
]

◆ $templatecontext [5/7]

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

◆ $templatecontext [6/7]

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

◆ $templatecontext [7/7]

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

◆ activityheaderconfig

$THEME activityheaderconfig
Initial value:
= [
'notitle' => true
]

◆ else

if (isloggedin()) else
Initial value:
{
$courseindexopen = false

◆ scss

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