mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merge branch 'MDL-84448-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
b498552116
@ -162,6 +162,23 @@ class behat_context_helper {
|
||||
return $overrideclassname;
|
||||
}
|
||||
|
||||
try {
|
||||
$themeconfig = theme_config::load($suitename);
|
||||
} catch (Exception $e) {
|
||||
// This theme has no theme config.
|
||||
return null;
|
||||
}
|
||||
|
||||
// The theme will use all core contexts, except the one overridden by theme or its parent.
|
||||
if (isset($themeconfig->parents)) {
|
||||
foreach ($themeconfig->parents as $parent) {
|
||||
$overrideclassname = "behat_theme_{$parent}_{$classname}";
|
||||
if (self::$environment->hasContextClass($overrideclassname)) {
|
||||
return $overrideclassname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self::$environment->hasContextClass($classname)) {
|
||||
return $classname;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user