MDL-78974 themes: define removedprimarynavitems theme config property.

All configurable theme config properties must be defined at the class
level, lest PHP 8.2 complain about creation of dynamic properties.
This commit is contained in:
Paul Holden 2023-08-11 13:38:02 +01:00
parent 6f40d9ffd7
commit 45f6fbcbe7
No known key found for this signature in database
GPG key ID: A81A96D6045F6164

View file

@ -714,6 +714,12 @@ class theme_config {
*/
public $haseditswitch = false;
/**
* Allows a theme to customise primary navigation by specifying the list of items to remove.
* @var array
*/
public $removedprimarynavitems = [];
/**
* Load the config.php file for a particular theme, and return an instance
* of this class. (That is, this is a factory method.)
@ -784,6 +790,7 @@ class theme_config {
$baseconfig = $config;
}
// Ensure that each of the configurable properties defined below are also defined at the class level.
$configurable = [
'parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets', 'usefallback',
'javascripts', 'javascripts_footer', 'parents_exclude_javascripts',