Merge remote-tracking branch 'origin/support/2.7' into support/3.0

N°5741 - remove use of get_config_parameter and get_module_setting in Twig

# Conflicts:
#	application/twigextension.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/Twig/AppExtension.php
#	sources/application/TwigBase/Twig/Extension.php
This commit is contained in:
Eric Espie
2022-11-23 17:38:27 +01:00
13 changed files with 155 additions and 77 deletions

View File

@@ -86,6 +86,9 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut
protected $bIsExpanded;
/** @var bool Whether the hint on how the menu filter works shoudl be displayed or not */
protected $bShowMenuFilterHint;
/** @var bool */
protected $bShowMenusCount;
/**
* NavigationMenu constructor.
@@ -106,10 +109,13 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut
) {
parent::__construct($sId);
$oConfig = MetaModel::GetConfig();
$this->sAppRevisionNumber = utils::GetAppRevisionNumber();
$this->sAppSquareIconUrl = Branding::GetCompactMainLogoAbsoluteUrl();
$this->sAppFullIconUrl = Branding::GetFullMainLogoAbsoluteUrl();
$this->sAppIconLink = MetaModel::GetConfig()->Get('app_icon_url');
$this->sAppIconLink = $oConfig->Get('app_icon_url');
$this->SetShowMenusCount($oConfig->Get('navigation_menu.show_menus_count'));
$this->aSiloSelection = array();
$this->aMenuGroups = ApplicationMenu::GetMenuGroups($oAppContext->GetAsHash());
$this->oUserMenu = $oUserMenu;
@@ -479,4 +485,21 @@ JS;
{
return "[data-role='".static::BLOCK_CODE."']";
}
/**
* @return bool
*/
public function GetShowMenusCount(): bool
{
return $this->bShowMenusCount;
}
/**
* @param bool $bShowMenusCount
*/
public function SetShowMenusCount(bool $bShowMenusCount): void
{
$this->bShowMenusCount = $bShowMenusCount;
}
}