From 820087e4d144388cac53060292c88b9985ef1010 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Mon, 4 Aug 2025 10:30:38 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04500=20-=20Remove=20iPageUIExtension=20&?= =?UTF-8?q?=20AbstractPageUIExtension=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/applicationextension.inc.php | 93 +------------------ core/metamodel.class.php | 1 - lib/composer/InstalledVersions.php | 27 +++++- lib/composer/autoload_classmap.php | 12 +-- lib/composer/autoload_psr4.php | 2 +- lib/composer/autoload_static.php | 16 +--- lib/composer/installed.php | 8 +- sources/Application/WebPage/iTopWebPage.php | 77 --------------- .../extension-blocks/banner.html.twig | 3 - .../extension-blocks/footer.html.twig | 3 - .../extension-blocks/header.html.twig | 3 - .../ApplicationExtensionTest.php | 4 - ...plication-extension-usages-in-snippets.xml | 10 -- 13 files changed, 33 insertions(+), 226 deletions(-) diff --git a/application/applicationextension.inc.php b/application/applicationextension.inc.php index fc0a84151..022ef6684 100644 --- a/application/applicationextension.inc.php +++ b/application/applicationextension.inc.php @@ -1158,61 +1158,6 @@ class JSButtonItem extends JSPopupMenuItem } -/** - * Implement this interface to add content to any iTopWebPage - * - * There are 3 places where content can be added: - * - * * The north pane: (normaly empty/hidden) at the top of the page, spanning the whole - * width of the page - * * The south pane: (normaly empty/hidden) at the bottom of the page, spanning the whole - * width of the page - * * The admin banner (two tones gray background) at the left of the global search. - * Limited space, use it for short messages - * - * Each of the methods of this interface is supposed to return the HTML to be inserted at - * the specified place and can use the passed iTopWebPage object to add javascript or CSS definitions - * - * @api - * @package UIExtensibilityAPI - * @since 2.0 - * @deprecated 3.0.0 If you need to include: - * * JS/CSS files/snippets, use {@see \iBackofficeLinkedScriptsExtension}, {@see \iBackofficeLinkedStylesheetsExtension}, etc instead - * * HTML (and optionally JS/CSS), use {@see \iPageUIBlockExtension} to manipulate {@see \Combodo\iTop\Application\UI\Base\UIBlock} instead - */ -interface iPageUIExtension -{ - /** - * Add content to the header of the page - * - * @api - * @param iTopWebPage $oPage The page to insert stuff into. - * - * @return string The HTML content to add into the page - */ - public function GetNorthPaneHtml(iTopWebPage $oPage); - - /** - * Add content to the footer of the page - * - * @api - * @param iTopWebPage $oPage The page to insert stuff into. - * - * @return string The HTML content to add into the page - */ - public function GetSouthPaneHtml(iTopWebPage $oPage); - - /** - * Add content to the "admin banner" - * - * @api - * @param iTopWebPage $oPage The page to insert stuff into. - * - * @return string The HTML content to add into the page - */ - public function GetBannerHtml(iTopWebPage $oPage); -} - /** * Implement this interface to add content to any iTopWebPage * @@ -1260,43 +1205,7 @@ interface iPageUIBlockExtension } /** - * Extend this class instead of iPageUIExtension if you don't need to overload all methods - * - * @api - * @package UIExtensibilityAPI - * @since 2.7.0 - * @deprecated 3.0.0 use AbstractPageUIBlockExtension instead - */ -abstract class AbstractPageUIExtension implements iPageUIExtension -{ - /** - * @inheritDoc - */ - public function GetNorthPaneHtml(iTopWebPage $oPage) - { - return ''; - } - - /** - * @inheritDoc - */ - public function GetSouthPaneHtml(iTopWebPage $oPage) - { - return ''; - } - - /** - * @inheritDoc - */ - public function GetBannerHtml(iTopWebPage $oPage) - { - return ''; - } - -} - -/** - * Extend this class instead of iPageUIExtension if you don't need to overload all methods + * Extend this class instead of iPageUIBlockExtension if you don't need to overload all methods * * @api * @package UIBlockExtensibilityAPI diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 1046a1965..6d8e9ca7d 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -7665,7 +7665,6 @@ abstract class MetaModel 'iApplicationUIExtension', 'iApplicationObjectExtension', 'iPopupMenuExtension', - 'iPageUIExtension', 'iPageUIBlockExtension', 'iBackofficeLinkedScriptsExtension', 'iBackofficeEarlyScriptExtension', diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php index 51e734a77..6d29bff66 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -32,6 +32,11 @@ class InstalledVersions */ private static $installed; + /** + * @var bool + */ + private static $installedIsLocalDir; + /** * @var bool|null */ @@ -309,6 +314,12 @@ class InstalledVersions { self::$installed = $data; self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; } /** @@ -322,19 +333,27 @@ class InstalledVersions } $installed = array(); + $copiedLocalDir = false; if (self::$canGetVendors) { + $selfDir = strtr(__DIR__, '\\', '/'); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; } } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } } } @@ -350,7 +369,7 @@ class InstalledVersions } } - if (self::$installed !== array()) { + if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index 095101caa..e40ff9a34 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -10,7 +10,6 @@ return array( 'AbstractApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'AbstractLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php', 'AbstractPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php', - 'AbstractPageUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'AbstractPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'AbstractPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php', 'AbstractWeeklyScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php', @@ -470,7 +469,6 @@ return array( 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => $baseDir . '/sources/Form/Validator/MultipleChoicesValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Form\\Validator\\Validator' => $baseDir . '/sources/Form/Validator/Validator.php', 'Combodo\\iTop\\Kernel' => $baseDir . '/sources/Kernel.php', 'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => $baseDir . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', @@ -574,7 +572,6 @@ return array( 'DashletPlainText' => $baseDir . '/application/dashlet.class.inc.php', 'DashletProxy' => $baseDir . '/application/dashlet.class.inc.php', 'DashletUnknown' => $baseDir . '/application/dashlet.class.inc.php', - 'DataTable' => $baseDir . '/application/datatable.class.inc.php', 'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', 'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php', 'DateException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateException.php', @@ -614,7 +611,6 @@ return array( 'DictExceptionMissingString' => $baseDir . '/application/exceptions/dict/DictExceptionMissingString.php', 'DictExceptionUnknownLanguage' => $baseDir . '/application/exceptions/dict/DictExceptionUnknownLanguage.php', 'DisplayBlock' => $baseDir . '/application/displayblock.class.inc.php', - 'DisplayTemplate' => $baseDir . '/application/template.class.inc.php', 'DisplayableEdge' => $baseDir . '/core/displayablegraph.class.inc.php', 'DisplayableGraph' => $baseDir . '/core/displayablegraph.class.inc.php', 'DisplayableGroupNode' => $baseDir . '/core/displayablegraph.class.inc.php', @@ -643,9 +639,6 @@ return array( 'FieldOqlExpression' => $baseDir . '/core/oql/oqlquery.class.inc.php', 'FileLog' => $baseDir . '/core/log.class.inc.php', 'FileUploadException' => $baseDir . '/application/utils.inc.php', - 'FilterDefinition' => $baseDir . '/core/filterdef.class.inc.php', - 'FilterFromAttribute' => $baseDir . '/core/filterdef.class.inc.php', - 'FilterPrivateKey' => $baseDir . '/core/filterdef.class.inc.php', 'FindStylesheetObject' => $baseDir . '/application/findstylesheetobject.class.inc.php', 'Firebase\\JWT\\BeforeValidException' => $vendorDir . '/firebase/php-jwt/src/BeforeValidException.php', 'Firebase\\JWT\\CachedKeySet' => $vendorDir . '/firebase/php-jwt/src/CachedKeySet.php', @@ -1164,7 +1157,6 @@ return array( 'OQLParser_yyStackEntry' => $baseDir . '/core/oql/oql-parser.php', 'OQLParser_yyToken' => $baseDir . '/core/oql/oql-parser.php', 'OS_Guess' => $vendorDir . '/pear/pear-core-minimal/src/OS/Guess.php', - 'ObjectDetailsTemplate' => $baseDir . '/application/template.class.inc.php', 'ObjectResult' => $baseDir . '/core/restservices.class.inc.php', 'ObjectStimulus' => $baseDir . '/core/stimulus.class.inc.php', 'ObsolescenceDateUpdater' => $baseDir . '/core/background.inc.php', @@ -1448,7 +1440,6 @@ return array( 'PluginManager' => $baseDir . '/core/pluginmanager.class.inc.php', 'PortalDispatcher' => $baseDir . '/application/portaldispatcher.class.inc.php', 'PortalURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php', - 'PrintableDataTable' => $baseDir . '/application/datatable.class.inc.php', 'ProcessException' => $baseDir . '/application/exceptions/process/ProcessException.php', 'ProcessFatalException' => $baseDir . '/application/exceptions/process/ProcessFatalException.php', 'ProcessInvalidConfigException' => $baseDir . '/application/exceptions/process/ProcessInvalidConfigException.php', @@ -3163,7 +3154,6 @@ return array( 'WizardHelper' => $baseDir . '/application/wizardhelper.class.inc.php', 'XLSXWriter' => $baseDir . '/application/xlsxwriter.class.php', 'XMLBulkExport' => $baseDir . '/core/xmlbulkexport.class.inc.php', - 'ajax_page' => $baseDir . '/application/ajaxwebpage.class.inc.php', 'appUserPreferences' => $baseDir . '/application/user.preferences.class.inc.php', 'cmdbAbstractObject' => $baseDir . '/application/cmdbabstract.class.inc.php', 'cmdbDataGenerator' => $baseDir . '/core/data.generator.class.inc.php', @@ -3178,6 +3168,7 @@ return array( 'iBackofficeLinkedScriptsExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeLinkedStylesheetsExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeReadyScriptExtension' => $baseDir . '/application/applicationextension.inc.php', + 'iBackofficeSassExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeScriptExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeStyleExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackupExtraFilesExtension' => $baseDir . '/application/applicationextension.inc.php', @@ -3197,7 +3188,6 @@ return array( 'iNewsroomProvider' => $baseDir . '/application/newsroomprovider.class.inc.php', 'iOnClassInitialization' => $baseDir . '/core/metamodelmodifier.inc.php', 'iPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php', - 'iPageUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'iPopupMenuExtension' => $baseDir . '/application/applicationextension.inc.php', 'iPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'iPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php', diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php index c79e6f1dc..7b7ab3646 100644 --- a/lib/composer/autoload_psr4.php +++ b/lib/composer/autoload_psr4.php @@ -58,7 +58,7 @@ return array( 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'Pelago\\Emogrifier\\' => array($vendorDir . '/pelago/emogrifier/src'), - 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-google/src'), + 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-google/src', $vendorDir . '/league/oauth2-client/src'), 'Laminas\\Validator\\' => array($vendorDir . '/laminas/laminas-validator/src'), 'Laminas\\Stdlib\\' => array($vendorDir . '/laminas/laminas-stdlib/src'), 'Laminas\\ServiceManager\\' => array($vendorDir . '/laminas/laminas-servicemanager/src'), diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 5acd9e9b7..fb8df03ef 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -329,8 +329,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f ), 'League\\OAuth2\\Client\\' => array ( - 0 => __DIR__ . '/..' . '/league/oauth2-client/src', - 1 => __DIR__ . '/..' . '/league/oauth2-google/src', + 0 => __DIR__ . '/..' . '/league/oauth2-google/src', + 1 => __DIR__ . '/..' . '/league/oauth2-client/src', ), 'Laminas\\Validator\\' => array ( @@ -400,7 +400,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'AbstractApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'AbstractLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'AbstractPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'AbstractPageUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'AbstractPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'AbstractPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'AbstractWeeklyScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', @@ -860,7 +859,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MultipleChoicesValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php', - 'Combodo\\iTop\\Form\\Validator\\Validator' => __DIR__ . '/../..' . '/sources/Form/Validator/Validator.php', 'Combodo\\iTop\\Kernel' => __DIR__ . '/../..' . '/sources/Kernel.php', 'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php', 'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php', @@ -964,7 +962,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'DashletPlainText' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', 'DashletProxy' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', 'DashletUnknown' => __DIR__ . '/../..' . '/application/dashlet.class.inc.php', - 'DataTable' => __DIR__ . '/../..' . '/application/datatable.class.inc.php', 'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php', 'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php', 'DateException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateException.php', @@ -1004,7 +1001,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'DictExceptionMissingString' => __DIR__ . '/../..' . '/application/exceptions/dict/DictExceptionMissingString.php', 'DictExceptionUnknownLanguage' => __DIR__ . '/../..' . '/application/exceptions/dict/DictExceptionUnknownLanguage.php', 'DisplayBlock' => __DIR__ . '/../..' . '/application/displayblock.class.inc.php', - 'DisplayTemplate' => __DIR__ . '/../..' . '/application/template.class.inc.php', 'DisplayableEdge' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', 'DisplayableGraph' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', 'DisplayableGroupNode' => __DIR__ . '/../..' . '/core/displayablegraph.class.inc.php', @@ -1033,9 +1029,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'FieldOqlExpression' => __DIR__ . '/../..' . '/core/oql/oqlquery.class.inc.php', 'FileLog' => __DIR__ . '/../..' . '/core/log.class.inc.php', 'FileUploadException' => __DIR__ . '/../..' . '/application/utils.inc.php', - 'FilterDefinition' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', - 'FilterFromAttribute' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', - 'FilterPrivateKey' => __DIR__ . '/../..' . '/core/filterdef.class.inc.php', 'FindStylesheetObject' => __DIR__ . '/../..' . '/application/findstylesheetobject.class.inc.php', 'Firebase\\JWT\\BeforeValidException' => __DIR__ . '/..' . '/firebase/php-jwt/src/BeforeValidException.php', 'Firebase\\JWT\\CachedKeySet' => __DIR__ . '/..' . '/firebase/php-jwt/src/CachedKeySet.php', @@ -1554,7 +1547,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'OQLParser_yyStackEntry' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', 'OQLParser_yyToken' => __DIR__ . '/../..' . '/core/oql/oql-parser.php', 'OS_Guess' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/OS/Guess.php', - 'ObjectDetailsTemplate' => __DIR__ . '/../..' . '/application/template.class.inc.php', 'ObjectResult' => __DIR__ . '/../..' . '/core/restservices.class.inc.php', 'ObjectStimulus' => __DIR__ . '/../..' . '/core/stimulus.class.inc.php', 'ObsolescenceDateUpdater' => __DIR__ . '/../..' . '/core/background.inc.php', @@ -1838,7 +1830,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'PluginManager' => __DIR__ . '/../..' . '/core/pluginmanager.class.inc.php', 'PortalDispatcher' => __DIR__ . '/../..' . '/application/portaldispatcher.class.inc.php', 'PortalURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php', - 'PrintableDataTable' => __DIR__ . '/../..' . '/application/datatable.class.inc.php', 'ProcessException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessException.php', 'ProcessFatalException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessFatalException.php', 'ProcessInvalidConfigException' => __DIR__ . '/../..' . '/application/exceptions/process/ProcessInvalidConfigException.php', @@ -3553,7 +3544,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'WizardHelper' => __DIR__ . '/../..' . '/application/wizardhelper.class.inc.php', 'XLSXWriter' => __DIR__ . '/../..' . '/application/xlsxwriter.class.php', 'XMLBulkExport' => __DIR__ . '/../..' . '/core/xmlbulkexport.class.inc.php', - 'ajax_page' => __DIR__ . '/../..' . '/application/ajaxwebpage.class.inc.php', 'appUserPreferences' => __DIR__ . '/../..' . '/application/user.preferences.class.inc.php', 'cmdbAbstractObject' => __DIR__ . '/../..' . '/application/cmdbabstract.class.inc.php', 'cmdbDataGenerator' => __DIR__ . '/../..' . '/core/data.generator.class.inc.php', @@ -3568,6 +3558,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'iBackofficeLinkedScriptsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeLinkedStylesheetsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeReadyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', + 'iBackofficeSassExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeStyleExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackupExtraFilesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', @@ -3587,7 +3578,6 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'iNewsroomProvider' => __DIR__ . '/../..' . '/application/newsroomprovider.class.inc.php', 'iOnClassInitialization' => __DIR__ . '/../..' . '/core/metamodelmodifier.inc.php', 'iPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', - 'iPageUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iPopupMenuExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', diff --git a/lib/composer/installed.php b/lib/composer/installed.php index d8fd41591..ae0312d77 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'combodo/itop', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '1bf53bae2a481c76bba07e2f6d3447b4008efacd', + 'reference' => '3da33c4c647c709b6e3e1e62691f2b8a2df0d482', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,7 +22,7 @@ 'combodo/itop' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '1bf53bae2a481c76bba07e2f6d3447b4008efacd', + 'reference' => '3da33c4c647c709b6e3e1e62691f2b8a2df0d482', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -232,8 +232,8 @@ 'psr/container-implementation' => array( 'dev_requirement' => false, 'provided' => array( - 0 => '^1.0', - 1 => '1.1|2.0', + 0 => '1.1|2.0', + 1 => '^1.0', ), ), 'psr/event-dispatcher' => array( diff --git a/sources/Application/WebPage/iTopWebPage.php b/sources/Application/WebPage/iTopWebPage.php index 530d03d56..c862d6338 100644 --- a/sources/Application/WebPage/iTopWebPage.php +++ b/sources/Application/WebPage/iTopWebPage.php @@ -38,7 +38,6 @@ use Dict; use ExecutionKPI; use InlineImage; use iPageUIBlockExtension; -use iPageUIExtension; use MetaModel; use UserRights; use utils; @@ -623,34 +622,9 @@ JS return $aNewEntry; } - /** - * Render the banner HTML which can come from both iTop itself and from extensions - * - * @see \iPageUIExtension::GetBannerHtml() - * @internal - * - * @return string - * @since 3.0.0 - */ - protected function RenderBannerHtml() - { - $sBannerHtml = ''; - - // Call the extensions to add content to the page, warning they can also add styles or scripts through as they have access to the iTopWebPage - $sAPIClassName = iPageUIExtension::class; - /** @var \iPageUIExtension $oExtensionInstance */ - foreach (MetaModel::EnumPlugins($sAPIClassName) as $oExtensionInstance) { - DeprecatedCallsLog::NotifyDeprecatedPhpApi(get_class($oExtensionInstance), $sAPIClassName, "GetBannerHtml", "use " . iPageUIBlockExtension::class . "::GetBannerBlock() instead"); - $sBannerHtml .= $oExtensionInstance->GetBannerHtml($this); - } - - return $sBannerHtml; - } - /** * Render the banner UIBlock which can come from both iTop itself and from extensions * - * @see \iPageUIExtension::GetBannerHtml() * @internal * * @return iUIBlock @@ -673,34 +647,10 @@ JS return $oBanner; } - /** - * Render the header HTML which can come from both iTop itself and from extensions - * - * @see \iPageUIExtension::GetNorthPaneHtml() - * @internal - * - * @return string - * @since 3.0.0 - */ - protected function RenderHeaderHtml() - { - $sHeaderHtml = ''; - - // Call the extensions to add content to the page, warning they can also add styles or scripts through as they have access to the iTopWebPage - $sAPIClassName = iPageUIExtension::class; - /** @var \iPageUIExtension $oExtensionInstance */ - foreach (MetaModel::EnumPlugins($sAPIClassName) as $oExtensionInstance) { - DeprecatedCallsLog::NotifyDeprecatedPhpApi(get_class($oExtensionInstance), $sAPIClassName, "GetNorthPaneHtml", "use " . iPageUIBlockExtension::class . "::GetHeaderBlock() instead"); - $sHeaderHtml .= $oExtensionInstance->GetNorthPaneHtml($this); - } - - return $sHeaderHtml; - } /** * Render the header UIBlock which can come from both iTop itself and from extensions * - * @see \iPageUIExtension::GetHeaderHtml() * @internal * * @return iUIBlock @@ -772,34 +722,10 @@ HTML; return $oHeader; } - /** - * Render the footer HTML which can come from both iTop itself and from extensions - * - * @see \iPageUIExtension::GetSouthPaneHtml() - * @internal - * - * @return string - * @since 3.0.0 - */ - protected function RenderFooterHtml() - { - $sFooterHtml = ''; - - // Call the extensions to add content to the page, warning they can also add styles or scripts through as they have access to the iTopWebPage - $sAPIClassName = iPageUIExtension::class; - /** @var \iPageUIExtension $oExtensionInstance */ - foreach (MetaModel::EnumPlugins($sAPIClassName) as $oExtensionInstance) { - DeprecatedCallsLog::NotifyDeprecatedPhpApi(get_class($oExtensionInstance), $sAPIClassName, "GetSouthPaneHtml", "use " . iPageUIBlockExtension::class . "::GetFooterBlock() instead"); - $sFooterHtml .= $oExtensionInstance->GetSouthPaneHtml($this); - } - - return $sFooterHtml; - } /** * Render the footer UIBlock which can come from both iTop itself and from extensions * - * @see \iPageUIExtension::GetSouthPaneHtml() * @internal * * @return iUIBlock @@ -939,11 +865,8 @@ HTML; // Layouts $aData['aLayouts'] = [ - 'sBanner' => $this->RenderBannerHtml(), 'oBanner' => $this->RenderBannerBlock(), - 'sHeader' => $this->RenderHeaderHtml(), 'oHeader' => $this->RenderHeaderBlock(), - 'sFooter' => $this->RenderFooterHtml(), 'oFooter' => $this->RenderFooterBlock(), ]; // - Prepare navigation menu diff --git a/templates/pages/backoffice/extension-blocks/banner.html.twig b/templates/pages/backoffice/extension-blocks/banner.html.twig index 11a4737eb..e1969b8aa 100644 --- a/templates/pages/backoffice/extension-blocks/banner.html.twig +++ b/templates/pages/backoffice/extension-blocks/banner.html.twig @@ -2,9 +2,6 @@ {# @license http://opensource.org/licenses/AGPL-3.0 #} {% apply spaceless %}
- {% if aLayouts.sBanner is not empty %} - {{ aLayouts.sBanner|raw }} - {% endif %} {{ render_block(aLayouts.oBanner, {aPage: aPage}) }}
{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/extension-blocks/footer.html.twig b/templates/pages/backoffice/extension-blocks/footer.html.twig index b68af93a2..433b97917 100644 --- a/templates/pages/backoffice/extension-blocks/footer.html.twig +++ b/templates/pages/backoffice/extension-blocks/footer.html.twig @@ -3,9 +3,6 @@ {% apply spaceless %} diff --git a/templates/pages/backoffice/extension-blocks/header.html.twig b/templates/pages/backoffice/extension-blocks/header.html.twig index f2bdc1e3f..f25dffedb 100644 --- a/templates/pages/backoffice/extension-blocks/header.html.twig +++ b/templates/pages/backoffice/extension-blocks/header.html.twig @@ -2,9 +2,6 @@ {# @license http://opensource.org/licenses/AGPL-3.0 #} {% apply spaceless %}
- {% if aLayouts.sHeader is not empty %} - {{ aLayouts.sHeader|raw }} - {% endif %} {{ render_block(aLayouts.oHeader, {aPage: aPage}) }}
{% endapply %} \ No newline at end of file diff --git a/tests/php-unit-tests/unitary-tests/application/applicationextension/ApplicationExtensionTest.php b/tests/php-unit-tests/unitary-tests/application/applicationextension/ApplicationExtensionTest.php index 06e62bc94..44657908c 100644 --- a/tests/php-unit-tests/unitary-tests/application/applicationextension/ApplicationExtensionTest.php +++ b/tests/php-unit-tests/unitary-tests/application/applicationextension/ApplicationExtensionTest.php @@ -87,10 +87,6 @@ class ApplicationExtensionTest extends ItopCustomDatamodelTestCase \iPopupMenuExtension::class, static::ENUM_API_CALL_METHOD_ENUMPLUGINS, ], - \iPageUIExtension::class => [ - \iPageUIExtension::class, - static::ENUM_API_CALL_METHOD_ENUMPLUGINS, - ], \iPageUIBlockExtension::class => [ \iPageUIBlockExtension::class, static::ENUM_API_CALL_METHOD_ENUMPLUGINS, diff --git a/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml b/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml index 35add2b52..77d5f10b3 100644 --- a/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml +++ b/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml @@ -104,16 +104,6 @@ class ExampleFor_ApplicationPopupMenuItem extends \ApplicationPopupMenuItem { // Do nothing, we just need the class to exists for the unit test } -} - ]]> - - - core - 0 -