diff --git a/core/modules/help_topics/help_topics.api.php b/core/modules/help_topics/help_topics.api.php index a7284639d1c5a3000ee722421143417f0ca0babc..8e7fe6badc0c30844a20baa68477f3b42f92f95a 100644 --- a/core/modules/help_topics/help_topics.api.php +++ b/core/modules/help_topics/help_topics.api.php @@ -15,6 +15,11 @@ * * @param array $info * Array of help topic plugin definitions keyed by their plugin ID. + * + * @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. */ function hook_help_topics_info_alter(array &$info) { // Alter the help topic to be displayed on admin/help. diff --git a/core/modules/help_topics/help_topics.module b/core/modules/help_topics/help_topics.module index 9651d605712ceaa249f2a5a026e5e3641da152cf..f051873bdf433feb5e2176a4837f2127e53fab2c 100644 --- a/core/modules/help_topics/help_topics.module +++ b/core/modules/help_topics/help_topics.module @@ -34,7 +34,7 @@ function help_topics_help($route_name, RouteMatchInterface $route_match) { $output .= '</dl>'; return ['#markup' => $output]; - case 'help_topics.help_topic': + case 'help.help_topic': $help_home = Url::fromRoute('help.main')->toString(); return '<p>' . t('See the <a href=":help_page">Help page</a> for more topics.', [ ':help_page' => $help_home, diff --git a/core/modules/help_topics/help_topics.routing.yml b/core/modules/help_topics/help_topics.routing.yml index 88b4784f4d56665c17367530796e356760d918d7..4bf760ef78e682b31624de365cf67c42397bdf94 100644 --- a/core/modules/help_topics/help_topics.routing.yml +++ b/core/modules/help_topics/help_topics.routing.yml @@ -1,4 +1,4 @@ -help_topics.help_topic: +help.help_topic: path: '/admin/help/topic/{id}' defaults: _controller: '\Drupal\help_topics\Controller\HelpTopicPluginController::viewHelpTopic' diff --git a/core/modules/help_topics/help_topics.services.yml b/core/modules/help_topics/help_topics.services.yml index 47fe581b051efdcd6dd0117666c179c770c083c5..aff7698abc5ecdeecd56f3cf75cd1f02187b9a4a 100644 --- a/core/modules/help_topics/help_topics.services.yml +++ b/core/modules/help_topics/help_topics.services.yml @@ -1,5 +1,5 @@ services: - help_topics.breadcrumb: + help.breadcrumb: class: Drupal\help_topics\HelpBreadcrumbBuilder arguments: ['@string_translation'] tags: @@ -8,14 +8,14 @@ services: plugin.manager.help_topic: class: Drupal\help_topics\HelpTopicPluginManager arguments: ['@module_handler', '@theme_handler', '@cache.discovery'] - help_topics.twig.loader: + help.twig.loader: class: Drupal\help_topics\HelpTopicTwigLoader arguments: ['@app.root', '@module_handler', '@theme_handler'] # Lowest core priority because loading help topics is not the usual case. tags: - { name: twig.loader, priority: -200 } public: false - help_topics.plugin.manager.help_section: + plugin.manager.help_section_topics: class: Drupal\help_topics\HelpSectionManager decorates: plugin.manager.help_section parent: plugin.manager.help_section diff --git a/core/modules/help_topics/help_topics/help_topics.help_topic_search.html.twig b/core/modules/help_topics/help_topics/help.help_topic_search.html.twig similarity index 100% rename from core/modules/help_topics/help_topics/help_topics.help_topic_search.html.twig rename to core/modules/help_topics/help_topics/help.help_topic_search.html.twig diff --git a/core/modules/help_topics/help_topics/help_topics.help_topic_writing.html.twig b/core/modules/help_topics/help_topics/help.help_topic_writing.html.twig similarity index 100% rename from core/modules/help_topics/help_topics/help_topics.help_topic_writing.html.twig rename to core/modules/help_topics/help_topics/help.help_topic_writing.html.twig diff --git a/core/modules/help_topics/src/Controller/HelpTopicPluginController.php b/core/modules/help_topics/src/Controller/HelpTopicPluginController.php index 5e77eb635d1cc2b572e993a9204a0ec8075534d1..256acd389cd06e99e5d37685a1cdc0fd6ab7eb4e 100644 --- a/core/modules/help_topics/src/Controller/HelpTopicPluginController.php +++ b/core/modules/help_topics/src/Controller/HelpTopicPluginController.php @@ -62,7 +62,7 @@ public static function create(ContainerInterface $container) { * * @param string $id * The plugin ID. Maps to the {id} placeholder in the - * help_topics.help_topic route. + * help.help_topic route. * * @return array * A render array with the contents of a help topic page. @@ -91,7 +91,7 @@ public function viewHelpTopic($id) { $topic = $this->helpTopicPluginManager->createInstance($other_id); $links[$other_id] = [ 'title' => $topic->getLabel(), - 'url' => Url::fromRoute('help_topics.help_topic', ['id' => $other_id]), + 'url' => Url::fromRoute('help.help_topic', ['id' => $other_id]), ]; $this->renderer->addCacheableDependency($build, $topic); } diff --git a/core/modules/help_topics/src/HelpBreadcrumbBuilder.php b/core/modules/help_topics/src/HelpBreadcrumbBuilder.php index 8164c7e5dbd233721158fa124a8c2d70f53e581a..1387b4fa2ecdb1fe9b813b132ce710d02673249d 100644 --- a/core/modules/help_topics/src/HelpBreadcrumbBuilder.php +++ b/core/modules/help_topics/src/HelpBreadcrumbBuilder.php @@ -13,7 +13,7 @@ * Provides a breadcrumb builder for help topic pages. * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ @@ -35,7 +35,7 @@ public function __construct(TranslationInterface $string_translation) { * {@inheritdoc} */ public function applies(RouteMatchInterface $route_match) { - return $route_match->getRouteName() == 'help_topics.help_topic'; + return $route_match->getRouteName() == 'help.help_topic'; } /** diff --git a/core/modules/help_topics/src/HelpSectionManager.php b/core/modules/help_topics/src/HelpSectionManager.php index 44323ac7cca99d0cbeecc4ee7f61fdb417ef81b3..92e9b83e40481e975abcd17e3778be525966106f 100644 --- a/core/modules/help_topics/src/HelpSectionManager.php +++ b/core/modules/help_topics/src/HelpSectionManager.php @@ -7,6 +7,11 @@ /** * 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 index 6f6240d43197eb97de0d456b63bfe0387f23f37b..dd7ae162987bddd01ec5164d2be7171ee97dbf7d 100644 --- a/core/modules/help_topics/src/HelpTopicDiscovery.php +++ b/core/modules/help_topics/src/HelpTopicDiscovery.php @@ -18,7 +18,7 @@ * @see \Drupal\help_topics\HelpTopicTwigLoader * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/HelpTopicPluginBase.php b/core/modules/help_topics/src/HelpTopicPluginBase.php index 414e0d42d111779ecc4a7fe4c5202577bd71768f..5a0e90505f109c9ba05fdf21ee655c051c8b066f 100644 --- a/core/modules/help_topics/src/HelpTopicPluginBase.php +++ b/core/modules/help_topics/src/HelpTopicPluginBase.php @@ -10,7 +10,7 @@ * Base class for help topic plugins. * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ @@ -48,7 +48,7 @@ public function getRelated() { * {@inheritdoc} */ public function toUrl(array $options = []) { - return Url::fromRoute('help_topics.help_topic', ['id' => $this->getPluginId()], $options); + return Url::fromRoute('help.help_topic', ['id' => $this->getPluginId()], $options); } /** @@ -58,7 +58,7 @@ public function toLink($text = NULL, array $options = []) { if (!$text) { $text = $this->getLabel(); } - return Link::createFromRoute($text, 'help_topics.help_topic', ['id' => $this->getPluginId()], $options); + return Link::createFromRoute($text, 'help.help_topic', ['id' => $this->getPluginId()], $options); } } diff --git a/core/modules/help_topics/src/HelpTopicPluginInterface.php b/core/modules/help_topics/src/HelpTopicPluginInterface.php index feb762f17f0b6c2983cb1e8b615c6db47f1a0607..50eb42c7a05164f2ab861a3f906d7c33b233c0dd 100644 --- a/core/modules/help_topics/src/HelpTopicPluginInterface.php +++ b/core/modules/help_topics/src/HelpTopicPluginInterface.php @@ -12,7 +12,7 @@ * @see \Drupal\help_topics\HelpTopicPluginManager * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/HelpTopicPluginManager.php b/core/modules/help_topics/src/HelpTopicPluginManager.php index 636bdda0a42895370792f47bb137b911d59472bc..40efa85106308239bf836d7d2fe6413209f1dd80 100644 --- a/core/modules/help_topics/src/HelpTopicPluginManager.php +++ b/core/modules/help_topics/src/HelpTopicPluginManager.php @@ -62,7 +62,7 @@ * @see \Drupal\Component\Plugin\Derivative\DeriverInterface * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php b/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php index 2c33d5226f07b17a1adef843cbf697cf05967bcb..95e7ad6657be431a7178666b266b0efaaa381bb4 100644 --- a/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php +++ b/core/modules/help_topics/src/HelpTopicPluginManagerInterface.php @@ -8,7 +8,7 @@ * Defines an interface for managing help topics and storing their definitions. * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/HelpTopicTwig.php b/core/modules/help_topics/src/HelpTopicTwig.php index 2d383ebee8667b16ba505c1fe92b1a48951aaf73..3da9427f28ec987012711006cec0fbc3472e1f0e 100644 --- a/core/modules/help_topics/src/HelpTopicTwig.php +++ b/core/modules/help_topics/src/HelpTopicTwig.php @@ -15,7 +15,7 @@ * @see \Drupal\help_topics\HelpTopicPluginManager * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/HelpTopicTwigLoader.php b/core/modules/help_topics/src/HelpTopicTwigLoader.php index 186572550bb988d526948483a5c9822c670157e1..c945f526ddfca6d9d347a866c4fbaa1a723daa2b 100644 --- a/core/modules/help_topics/src/HelpTopicTwigLoader.php +++ b/core/modules/help_topics/src/HelpTopicTwigLoader.php @@ -20,7 +20,7 @@ * @see \Drupal\help_topics\HelpTopicTwig * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php b/core/modules/help_topics/src/Plugin/Search/HelpSearch.php index 7f5e14e13060b34eeca38ae858e6961ebf00457b..458dc4b8ac48d83b204b462e4bf58d3c43053267 100644 --- a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php +++ b/core/modules/help_topics/src/Plugin/Search/HelpSearch.php @@ -37,7 +37,7 @@ * ) * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/src/SearchableHelpInterface.php b/core/modules/help_topics/src/SearchableHelpInterface.php index 06fdb939c1e3a7269b37cf0549faf1d0e2870e91..8b6b8ebc33b712abe7507ad20f568a930ea41d53 100644 --- a/core/modules/help_topics/src/SearchableHelpInterface.php +++ b/core/modules/help_topics/src/SearchableHelpInterface.php @@ -10,7 +10,7 @@ * @see \Drupal\help\HelpSectionPluginInterface * * @internal - * Help Topic is currently experimental and should only be leveraged by + * 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. */ diff --git a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig index 1b324a144711f188e17e37d5626e5eb122df0fbc..d8126215dc2c3aa811ab4962c2185481f32552d1 100644 --- a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig +++ b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig @@ -5,7 +5,7 @@ related: - help_topics_test.linked - does_not_exist.and_no_error --- -{% set help_topic_url = render_var(url('help_topics.help_topic', {id: 'help_topics_test.additional'})) %} +{% set help_topic_url = render_var(url('help.help_topic', {id: 'help_topics_test.additional'})) %} <p>{% trans %}This is a test. It should <a href="{{ help_topic_url }}">link to the additional topic</a>. Also there should be a related topic link below to the Help module topic page and the linked topic.{% endtrans %}</p> <p>{% trans %}Nonworditem totranslate.{% endtrans %}</p> <p>{% trans %}Test translation.{% endtrans %}</p>