function template_preprocess_authorize_report
Prepares variables for authorize.php operation report templates.
This report displays the results of an operation run via authorize.php.
Default template: authorize-report.html.twig.
Parameters
array $variables: An associative array containing:
- messages: An array of result messages.
Deprecated
in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site.
See also
https://www.drupal.org/node/3522119
File
- 
              core/includes/ theme.inc, line 1067 
Code
function template_preprocess_authorize_report(&$variables) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3522119', E_USER_DEPRECATED);
  $messages = [];
  if (!empty($variables['messages'])) {
    foreach ($variables['messages'] as $heading => $logs) {
      $items = [];
      foreach ($logs as $number => $log_message) {
        if ($number === '#abort') {
          continue;
        }
        $class = 'authorize-results__' . ($log_message['success'] ? 'success' : 'failure');
        $items[] = [
          '#wrapper_attributes' => [
            'class' => [
              $class,
            ],
          ],
          '#markup' => $log_message['message'],
        ];
      }
      $messages[] = [
        '#theme' => 'item_list',
        '#items' => $items,
        '#title' => $heading,
      ];
    }
  }
  $variables['messages'] = $messages;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
