Update Help Example to reflect that theme() is deprecated

Created on 25 July 2022, over 2 years ago
Updated 26 October 2023, over 1 year ago

Problem/Motivation

The documentation for the Drupal 7 version contained the following code snippet example for how to provide a themed link to popup about a topic:

$output = theme('advanced_help_topic', array(
  'module' => 'help_example',
  'topic' => 'about-php',
));
$output .= ' ' . t('Click the help icon!');

This function is used to create themed links on the "Example help" that is generated by HelpExampleController.

The legacy text from Drupal 7 can be found in a file named "legacy.txt" in the Controller directory. This text need to berestored, with the same functionality it provided for the Drupal 7 version of the module.

In Drupal 9/10, the function theme() is deprecated. A valid equivalent example for Drupal 9 has to be created, and how to use it must be added to HelpExampleController.

Remaining tasks

  1. Locate some documentation bout how to replace the theme() in Drupal 9/10.
  2. Test it out in the HelpExampleController in the Advanced Help Example submodule.
  3. Update the documentation to reflect the correct way of doing this for Drupal 9/10.
🐛 Bug report
Status

Active

Version

1.0

Component

Documentation

Created by

🇳🇴Norway gisle Norway

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024