Merge "Minerva nav_urls are used only when OverflowMenu is present"

This commit is contained in:
jenkins-bot 2019-06-03 17:26:03 +00:00 committed by Gerrit Code Review
commit 9dd0d21029
1 changed files with 14 additions and 0 deletions

View File

@ -1045,6 +1045,20 @@ class SkinMinerva extends SkinTemplate {
] ) );
}
/**
* Unless the OverflowMenu is enabled, Minerva doesn't use nav_urls from QuikcTemplate.
* We can skip that heavy operation
* @return array
*/
protected function buildNavUrls() {
if ( $this->isAllowedPageAction( SkinOptions::OPTION_OVERFLOW_SUBMENU ) ) {
// the OverflowMenu uses nav_urls, use the value from SkinTemplate
return parent::buildNavUrls();
} else {
return [];
}
}
/**
* @param BaseTemplate $tpl
* @return array