function template_preprocess_system_modules_details

Same name and namespace in other branches
  1. 10 core/modules/system/system.admin.inc \template_preprocess_system_modules_details()
  2. 9 core/modules/system/system.admin.inc \template_preprocess_system_modules_details()
  3. 8.9.x core/modules/system/system.admin.inc \template_preprocess_system_modules_details()

Prepares variables for the module details templates.

Default template: system-modules-details.html.twig.

Parameters

array $variables: An associative array containing:

  • form: A render element representing the form. The main form element represents a package, and child elements of the form are individual projects. Each project (or module) is an associative array containing the following elements:

    • name: The name of the module.
    • enable: A checkbox for enabling the module.
    • description: A description of the module.
    • version: The version of the module.
    • links: Administration links provided by the module.
    • #requires: A list of modules that the project requires.
    • #required_by: A list of modules and themes that require the project.
    • #attributes: A list of attributes for the module wrapper.

Deprecated

in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme().

See also

https://www.drupal.org/node/3504125

\Drupal\system\Form\ModulesListForm

Related topics

File

core/modules/system/system.module, line 487

Code

function template_preprocess_system_modules_details(&$variables) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme(). See https://www.drupal.org/node/3504125', E_USER_DEPRECATED);
  \Drupal::service(SystemAdminThemePreprocess::class)->preprocessSystemModulesDetails($variables);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.