MDL-72032 core_behat: secondary navigation behat fixes

- Part of: MDL-69588
This commit is contained in:
Bas Brands
2021-08-23 17:47:02 +08:00
committed by Mathew May
parent 3110abec03
commit da33265d73
6 changed files with 59 additions and 6 deletions
+5 -2
View File
@@ -3816,18 +3816,21 @@ EOD;
* @return string
*/
public function more_menu($content, $navbarstyle) {
$tabs = ($navbarstyle == 'nav-tabs');
if (is_object($content)) {
if (!isset($content->children) || count($content->children) == 0) {
return false;
}
return $this->render_from_template('core/moremenu', (object) [
'nodecollection' => $content,
'navbarstyle' => $navbarstyle
'navbarstyle' => $navbarstyle,
'tabs' => $tabs
]);
} else {
return $this->render_from_template('core/moremenu', (object) [
'nodearray' => $content,
'navbarstyle' => $navbarstyle
'navbarstyle' => $navbarstyle,
'tabs' => $tabs
]);
}
}