From 31e7810e7f3c39c25476eb1c50970aaf2c0da11e Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Mon, 25 Mar 2024 23:10:35 +0000 Subject: [PATCH] Issue #3433019 by andypost, catch: Replace deprecated help_topics module with obsolete stub --- core/modules/help_topics/help_topics.info.yml | 5 +- core/modules/help_topics/help_topics.module | 24 ------- .../Controller/HelpTopicPluginController.php | 17 ----- .../help_topics/src/HelpBreadcrumbBuilder.php | 17 ----- .../help_topics/src/HelpSectionManager.php | 17 ----- .../help_topics/src/HelpTopicDiscovery.php | 20 ------ .../help_topics/src/HelpTopicPluginBase.php | 17 ----- .../src/HelpTopicPluginInterface.php | 19 ------ .../src/HelpTopicPluginManager.php | 68 ------------------- .../src/HelpTopicPluginManagerInterface.php | 17 ----- .../modules/help_topics/src/HelpTopicTwig.php | 21 ------ .../help_topics/src/HelpTopicTwigLoader.php | 24 ------- .../help_topics/src/HelpTwigExtension.php | 17 ----- .../Plugin/HelpSection/HelpTopicSection.php | 16 ----- .../src/Plugin/Search/HelpSearch.php | 23 ------- .../src/SearchableHelpInterface.php | 19 ------ .../templates/help-topic.html.twig | 16 ----- 17 files changed, 3 insertions(+), 354 deletions(-) delete mode 100644 core/modules/help_topics/help_topics.module delete mode 100644 core/modules/help_topics/src/Controller/HelpTopicPluginController.php delete mode 100644 core/modules/help_topics/src/HelpBreadcrumbBuilder.php delete mode 100644 core/modules/help_topics/src/HelpSectionManager.php delete mode 100644 core/modules/help_topics/src/HelpTopicDiscovery.php delete mode 100644 core/modules/help_topics/src/HelpTopicPluginBase.php delete mode 100644 core/modules/help_topics/src/HelpTopicPluginInterface.php delete mode 100644 core/modules/help_topics/src/HelpTopicPluginManager.php delete mode 100644 core/modules/help_topics/src/HelpTopicPluginManagerInterface.php delete mode 100644 core/modules/help_topics/src/HelpTopicTwig.php delete mode 100644 core/modules/help_topics/src/HelpTopicTwigLoader.php delete mode 100644 core/modules/help_topics/src/HelpTwigExtension.php delete mode 100644 core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php delete mode 100644 core/modules/help_topics/src/Plugin/Search/HelpSearch.php delete mode 100644 core/modules/help_topics/src/SearchableHelpInterface.php delete mode 100644 core/modules/help_topics/templates/help-topic.html.twig diff --git a/core/modules/help_topics/help_topics.info.yml b/core/modules/help_topics/help_topics.info.yml index 5957dd3fab5a..78d66b58df0d 100644 --- a/core/modules/help_topics/help_topics.info.yml +++ b/core/modules/help_topics/help_topics.info.yml @@ -2,8 +2,9 @@ name: Help Topics type: module description: 'Displays help topics provided by themes and modules.' package: Core (Experimental) -lifecycle: deprecated -lifecycle_link: https://www.drupal.org/node/3223395#s-help_topics +lifecycle: obsolete +lifecycle_link: https://www.drupal.org/node/3223395#s-help-topics version: VERSION dependencies: - drupal:help +hidden: true diff --git a/core/modules/help_topics/help_topics.module b/core/modules/help_topics/help_topics.module deleted file mode 100644 index 2d7df5bfd14c..000000000000 --- a/core/modules/help_topics/help_topics.module +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Displays help topics provided by modules and themes. - */ - -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; - -/** - * Implements hook_help(). - */ -function help_topics_help($route_name, RouteMatchInterface $route_match) { - if ($route_name == 'help.page.help_topics') { - $help_home = Url::fromRoute('help.main')->toString(); - $output = '<h2>' . t('About') . '</h2>'; - $output .= '<p>' . t('The Help Topics module has been moved to the Help module.') . '</p>'; - $output .= '<p>' . t('See the <a href=":help_page">Help page</a> to view topics.', [ - ':help_page' => $help_home, - ]) . '</p>'; - return ['#markup' => $output]; - } -} diff --git a/core/modules/help_topics/src/Controller/HelpTopicPluginController.php b/core/modules/help_topics/src/Controller/HelpTopicPluginController.php deleted file mode 100644 index 4c14477a387a..000000000000 --- a/core/modules/help_topics/src/Controller/HelpTopicPluginController.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics\Controller; - -use Drupal\help\Controller\HelpTopicPluginController as CoreHelpTopicPluginController; - -/** - * Controller for help topic plugins. - * - * @internal - * Help Topic is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicPluginController extends CoreHelpTopicPluginController { - -} diff --git a/core/modules/help_topics/src/HelpBreadcrumbBuilder.php b/core/modules/help_topics/src/HelpBreadcrumbBuilder.php deleted file mode 100644 index d8bcad01b92a..000000000000 --- a/core/modules/help_topics/src/HelpBreadcrumbBuilder.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpBreadcrumbBuilder as CoreHelpBreadcrumbBuilder; - -/** - * Provides a breadcrumb builder for help topic pages. - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpBreadcrumbBuilder extends CoreHelpBreadcrumbBuilder { - -} diff --git a/core/modules/help_topics/src/HelpSectionManager.php b/core/modules/help_topics/src/HelpSectionManager.php deleted file mode 100644 index 906e411d1324..000000000000 --- a/core/modules/help_topics/src/HelpSectionManager.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpSectionManager as CoreHelpSectionManager; - -/** - * Decorates the Help Section plugin manager to provide help topic search. - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpSectionManager extends CoreHelpSectionManager { - -} diff --git a/core/modules/help_topics/src/HelpTopicDiscovery.php b/core/modules/help_topics/src/HelpTopicDiscovery.php deleted file mode 100644 index 0a7d2d147667..000000000000 --- a/core/modules/help_topics/src/HelpTopicDiscovery.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicDiscovery as CoreHelpTopicDiscovery; - -/** - * Discovers help topic plugins from Twig files in help_topics directories. - * - * @see \Drupal\help_topics\HelpTopicTwig - * @see \Drupal\help_topics\HelpTopicTwigLoader - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicDiscovery extends CoreHelpTopicDiscovery { - -} diff --git a/core/modules/help_topics/src/HelpTopicPluginBase.php b/core/modules/help_topics/src/HelpTopicPluginBase.php deleted file mode 100644 index f40e7a6a6a80..000000000000 --- a/core/modules/help_topics/src/HelpTopicPluginBase.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicPluginBase as CoreHelpTopicPluginBase; - -/** - * Base class for help topic plugins. - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -abstract class HelpTopicPluginBase extends CoreHelpTopicPluginBase { - -} diff --git a/core/modules/help_topics/src/HelpTopicPluginInterface.php b/core/modules/help_topics/src/HelpTopicPluginInterface.php deleted file mode 100644 index 00c94dbf0098..000000000000 --- a/core/modules/help_topics/src/HelpTopicPluginInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicPluginInterface as CoreHelpTopicPluginInterface; - -/** - * Defines an interface for help topic plugin classes. - * - * @see \Drupal\help_topics\HelpTopicPluginManager - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -interface HelpTopicPluginInterface extends CoreHelpTopicPluginInterface { - -} diff --git a/core/modules/help_topics/src/HelpTopicPluginManager.php b/core/modules/help_topics/src/HelpTopicPluginManager.php deleted file mode 100644 index 87531a664a88..000000000000 --- a/core/modules/help_topics/src/HelpTopicPluginManager.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicPluginManager as CoreHelpTopicPluginManager; - -/** - * Provides the default help_topic manager. - * - * Modules and themes can provide help topics in .html.twig files called - * provider.name_of_topic.html.twig inside the module or theme sub-directory - * help_topics. The provider is validated to be the extension that provides the - * help topic. - * - * The Twig file must contain YAML front matter with a key named 'label'. It can - * also contain keys named 'top_level' and 'related'. For example: - * @code - * --- - * label: 'Configuring error responses, including 403/404 pages' - * - * # Related help topics in an array. - * related: - * - core.config_basic - * - core.maintenance - * - * # If the value is true then the help topic will appear on admin/help. - * top_level: true - * --- - * @endcode - * - * In addition, modules wishing to add plugins can define them in a - * module_name.help_topics.yml file, with the plugin ID as the heading for - * each entry, and these properties: - * - id: The plugin ID. - * - class: The name of your plugin class, implementing - * \Drupal\help_topics\HelpTopicPluginInterface. - * - top_level: TRUE if the topic is top-level. - * - related: Array of IDs of topics this one is related to. - * - Additional properties that your plugin class needs, such as 'label'. - * - * You can also provide an entry that designates a plugin deriver class in your - * help_topics.yml file, with a heading giving a prefix ID for your group of - * derived plugins, and a 'deriver' property giving the name of a class - * implementing \Drupal\Component\Plugin\Derivative\DeriverInterface. Example: - * @code - * my_module_prefix: - * deriver: 'Drupal\my_module\Plugin\Deriver\HelpTopicDeriver' - * @endcode - * - * @ingroup help_docs - * - * @see \Drupal\help_topics\HelpTopicDiscovery - * @see \Drupal\help_topics\HelpTopicTwig - * @see \Drupal\help_topics\HelpTopicTwigLoader - * @see \Drupal\help_topics\HelpTopicPluginInterface - * @see \Drupal\help_topics\HelpTopicPluginBase - * @see hook_help_topics_info_alter() - * @see plugin_api - * @see \Drupal\Component\Plugin\Derivative\DeriverInterface - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicPluginManager extends CoreHelpTopicPluginManager { - -} diff --git a/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php b/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php deleted file mode 100644 index d07cc097d8bb..000000000000 --- a/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicPluginManagerInterface as CoreHelpTopicPluginManagerInterface; - -/** - * Defines an interface for managing help topics and storing their definitions. - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -interface HelpTopicPluginManagerInterface extends CoreHelpTopicPluginManagerInterface { - -} diff --git a/core/modules/help_topics/src/HelpTopicTwig.php b/core/modules/help_topics/src/HelpTopicTwig.php deleted file mode 100644 index 8e88eade1409..000000000000 --- a/core/modules/help_topics/src/HelpTopicTwig.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicTwig as CoreHelpTopicTwig; - -/** - * Represents a help topic plugin whose definition comes from a Twig file. - * - * @see \Drupal\help_topics\HelpTopicDiscovery - * @see \Drupal\help_topics\HelpTopicTwigLoader - * @see \Drupal\help_topics\HelpTopicPluginManager - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicTwig extends CoreHelpTopicTwig { - -} diff --git a/core/modules/help_topics/src/HelpTopicTwigLoader.php b/core/modules/help_topics/src/HelpTopicTwigLoader.php deleted file mode 100644 index db12a36d2457..000000000000 --- a/core/modules/help_topics/src/HelpTopicTwigLoader.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTopicTwigLoader as CoreHelpTopicTwigLoader; - -/** - * Loads help topic Twig files from the filesystem. - * - * This loader adds module and theme help topic paths to a help_topics namespace - * to the Twig filesystem loader so that help_topics can be referenced, using - * '@help-topic/pluginId.html.twig'. - * - * @see \Drupal\help_topics\HelpTopicDiscovery - * @see \Drupal\help_topics\HelpTopicTwig - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicTwigLoader extends CoreHelpTopicTwigLoader { - -} diff --git a/core/modules/help_topics/src/HelpTwigExtension.php b/core/modules/help_topics/src/HelpTwigExtension.php deleted file mode 100644 index 31d27cf38b23..000000000000 --- a/core/modules/help_topics/src/HelpTwigExtension.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\HelpTwigExtension as CoreHelpTwigExtension; - -/** - * Defines and registers Drupal Twig extensions for rendering help topics. - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTwigExtension extends CoreHelpTwigExtension { - -} diff --git a/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php b/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php deleted file mode 100644 index 04040fde2e0e..000000000000 --- a/core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Drupal\help_topics\Plugin\HelpSection; - -use Drupal\help\Plugin\HelpSection\HelpTopicSection as CoreHelpTopicSection; - -/** - * Provides the help topics list section for the help page. - * - * @internal - * Help Topic is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpTopicSection extends CoreHelpTopicSection { -} diff --git a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php b/core/modules/help_topics/src/Plugin/Search/HelpSearch.php deleted file mode 100644 index 7d1cade82cd4..000000000000 --- a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -namespace Drupal\help_topics\Plugin\Search; - -use Drupal\help\Plugin\Search\HelpSearch as CoreHelpSearch; - -/** - * Handles searching for help using the Search module index. - * - * Help items are indexed if their HelpSection plugin implements - * \Drupal\help\HelpSearchInterface. - * - * @see \Drupal\help\HelpSearchInterface - * @see \Drupal\help\HelpSectionPluginInterface - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -class HelpSearch extends CoreHelpSearch { - -} diff --git a/core/modules/help_topics/src/SearchableHelpInterface.php b/core/modules/help_topics/src/SearchableHelpInterface.php deleted file mode 100644 index ff3892058286..000000000000 --- a/core/modules/help_topics/src/SearchableHelpInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace Drupal\help_topics; - -use Drupal\help\SearchableHelpInterface as CoreSearchableHelpInterface; - -/** - * Provides an interface for a HelpSection plugin that also supports search. - * - * @see \Drupal\help\HelpSectionPluginInterface - * - * @internal - * Help Topics is currently experimental and should only be leveraged by - * experimental modules and development releases of contributed modules. - * See https://www.drupal.org/core/experimental for more information. - */ -interface SearchableHelpInterface extends CoreSearchableHelpInterface { - -} diff --git a/core/modules/help_topics/templates/help-topic.html.twig b/core/modules/help_topics/templates/help-topic.html.twig deleted file mode 100644 index cde833335532..000000000000 --- a/core/modules/help_topics/templates/help-topic.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{# -/** - * @file - * Default theme implementation to display a help topic. - * - * Available variables: - * - body: The body of the topic. - * - related: List of related topic links. - * - * @ingroup themeable - */ -#} -<article> - {{ body }} - {{ related }} -</article> -- GitLab