diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php
index 07fe238ed..bf0397488 100644
--- a/application/itopwebpage.class.inc.php
+++ b/application/itopwebpage.class.inc.php
@@ -52,6 +52,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
protected $sBreadCrumbEntryUrl;
protected $sBreadCrumbEntryIcon;
protected $sBreadCrumbEntryIconType;
+ /** @var \ContextTag $oCtx */
protected $oCtx;
/**
@@ -1063,7 +1064,7 @@ EOF
}
// Components
- // Note: For now all components are either included in the layouts above or put in page through the add_ui_block() API, so there is no need to do anything more.
+ // Note: For now all components are either included in the layouts above or put in page through the AddUiBlock() API, so there is no need to do anything more.
// Variable content of the page
$aData['aPage'] = array_merge(
diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php
index b25a02a9c..7dbbf6914 100644
--- a/application/menunode.class.inc.php
+++ b/application/menunode.class.inc.php
@@ -291,7 +291,7 @@ class ApplicationMenu
* @param array $aExtraParams
* @throws DictExceptionMissingString
*
- * @deprecated Will be removed in 2.8.0
+ * @deprecated Will be removed in 2.8.0, use static::GetMenuGroups() instead
*/
public static function DisplayMenu($oPage, $aExtraParams)
{
@@ -367,7 +367,7 @@ EOF
* @return bool True if the currently selected menu is one of the submenus
* @throws DictExceptionMissingString
* @throws \Exception
- * @deprecated Will be removed in 2.8.0
+ * @deprecated Will be removed in 2.8.0, use static::GetSubMenuNodes() instead
*/
protected static function DisplaySubMenu($oPage, $aMenus, $aExtraParams, $iActiveMenu = -1)
{
diff --git a/sources/application/UI/Component/Breadcrumbs/Breadcrumbs.php b/sources/application/UI/Component/Breadcrumbs/Breadcrumbs.php
index e49f3f486..a09357909 100644
--- a/sources/application/UI/Component/Breadcrumbs/Breadcrumbs.php
+++ b/sources/application/UI/Component/Breadcrumbs/Breadcrumbs.php
@@ -34,8 +34,8 @@ use utils;
*/
class Breadcrumbs extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-breadcrumbs';
-
const HTML_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
const JS_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
const JS_FILES_REL_PATH = [
diff --git a/sources/application/UI/Component/GlobalSearch/GlobalSearch.php b/sources/application/UI/Component/GlobalSearch/GlobalSearch.php
index d26aca458..ebb5f3859 100644
--- a/sources/application/UI/Component/GlobalSearch/GlobalSearch.php
+++ b/sources/application/UI/Component/GlobalSearch/GlobalSearch.php
@@ -33,8 +33,8 @@ use utils;
*/
class GlobalSearch extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-global-search';
-
const HTML_TEMPLATE_REL_PATH = 'components/global-search/layout';
const JS_TEMPLATE_REL_PATH = 'components/global-search/layout';
const JS_FILES_REL_PATH = [
diff --git a/sources/application/UI/Component/PopoverMenu/PopoverMenu.php b/sources/application/UI/Component/PopoverMenu/PopoverMenu.php
index aabfc8490..d2006ebd4 100644
--- a/sources/application/UI/Component/PopoverMenu/PopoverMenu.php
+++ b/sources/application/UI/Component/PopoverMenu/PopoverMenu.php
@@ -34,8 +34,8 @@ use Exception;
*/
class PopoverMenu extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-popover-menu';
-
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/layout';
//const JS_TEMPLATE_REl_PATH = 'components/popover-menu/layout';
const JS_FILES_REL_PATH = [
diff --git a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php
index 14c45f95b..78770772e 100644
--- a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php
+++ b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/JsPopoverMenuItem.php
@@ -32,6 +32,7 @@ use JSPopupMenuItem;
*/
class JsPopoverMenuItem extends PopoverMenuItem
{
+ // Overloaded constants
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_js';
public function GetJsCode()
diff --git a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php
index 346ab8c4b..375a4375a 100644
--- a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php
+++ b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/PopoverMenuItem.php
@@ -33,8 +33,8 @@ use Combodo\iTop\Application\UI\UIBlock;
*/
class PopoverMenuItem extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-popover-menu--item';
-
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/layout';
/** @var \ApplicationPopupMenuItem $oPopupMenuItem We decorate the class with the original \ApplicationPopupMenuItem as it is used among the application (backoffice, portal, extensions) and cannot be refactored without BC breaks */
diff --git a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php
index 4844b198f..90e4887c8 100644
--- a/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php
+++ b/sources/application/UI/Component/PopoverMenu/PopoverMenuItem/UrlPopoverMenuItem.php
@@ -30,6 +30,7 @@ namespace Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenuItem;
*/
class UrlPopoverMenuItem extends PopoverMenuItem
{
+ // Overloaded constants
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_url';
/** @ignore */
diff --git a/sources/application/UI/Component/QuickCreate/QuickCreate.php b/sources/application/UI/Component/QuickCreate/QuickCreate.php
index 59c342c48..3dc0cd70d 100644
--- a/sources/application/UI/Component/QuickCreate/QuickCreate.php
+++ b/sources/application/UI/Component/QuickCreate/QuickCreate.php
@@ -33,8 +33,8 @@ use UserRights;
*/
class QuickCreate extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-quick-create';
-
const HTML_TEMPLATE_REL_PATH = 'components/quick-create/layout';
const JS_TEMPLATE_REL_PATH = 'components/quick-create/layout';
const JS_FILES_REL_PATH = [
@@ -45,6 +45,7 @@ class QuickCreate extends UIBlock
'css/selectize.default.css',
];
+ // Specific constants
const DEFAULT_ENDPOINT_REL_URL = 'pages/UI.php';
/** @var array $aAvailableClasses */
diff --git a/sources/application/UI/Layout/NavigationMenu/NavigationMenu.php b/sources/application/UI/Layout/NavigationMenu/NavigationMenu.php
index e429eb618..383dc4537 100644
--- a/sources/application/UI/Layout/NavigationMenu/NavigationMenu.php
+++ b/sources/application/UI/Layout/NavigationMenu/NavigationMenu.php
@@ -42,8 +42,8 @@ use utils;
*/
class NavigationMenu extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-navigation-menu';
-
const HTML_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
const JS_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
const JS_FILES_REL_PATH = [
diff --git a/sources/application/UI/Layout/TopBar/TopBar.php b/sources/application/UI/Layout/TopBar/TopBar.php
index 76bd0d32b..22568a6cb 100644
--- a/sources/application/UI/Layout/TopBar/TopBar.php
+++ b/sources/application/UI/Layout/TopBar/TopBar.php
@@ -35,8 +35,8 @@ use Combodo\iTop\Application\UI\UIBlock;
*/
class TopBar extends UIBlock
{
+ // Overloaded constants
const BLOCK_CODE = 'ibo-top-bar';
-
const HTML_TEMPLATE_REL_PATH = 'layouts/top-bar/layout';
/** @var QuickCreate|null $oQuickCreate */
diff --git a/templates/pages/backoffice/layout.html.twig b/templates/pages/backoffice/layout.html.twig
index 78ac51cfc..f13228329 100644
--- a/templates/pages/backoffice/layout.html.twig
+++ b/templates/pages/backoffice/layout.html.twig
@@ -40,16 +40,14 @@
{{ render_block(aLayouts.oTopBar) }}
{{ include('pages/backoffice/extension-blocks/header.html.twig') }}
-