Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/update/update.report.inc @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
3 /** | 3 /** |
4 * @file | 4 * @file |
5 * Code required only when rendering the available updates report. | 5 * Code required only when rendering the available updates report. |
6 */ | 6 */ |
7 | 7 |
8 use Drupal\Component\Utility\Unicode; | |
9 use Drupal\Core\Template\Attribute; | 8 use Drupal\Core\Template\Attribute; |
10 use Drupal\Core\Url; | 9 use Drupal\Core\Url; |
11 | 10 |
12 /** | 11 /** |
13 * Prepares variables for project status report templates. | 12 * Prepares variables for project status report templates. |
29 // Attach the library to a variable that gets printed always. | 28 // Attach the library to a variable that gets printed always. |
30 '#attached' => [ | 29 '#attached' => [ |
31 'library' => [ | 30 'library' => [ |
32 'update/drupal.update.admin', | 31 'update/drupal.update.admin', |
33 ], | 32 ], |
34 ] | 33 ], |
35 ]; | 34 ]; |
36 | 35 |
37 // For no project update data, populate no data message. | 36 // For no project update data, populate no data message. |
38 if (empty($data)) { | 37 if (empty($data)) { |
39 $variables['no_updates_message'] = _update_no_data(); | 38 $variables['no_updates_message'] = _update_no_data(); |
52 $rows[$project['project_type']] = [ | 51 $rows[$project['project_type']] = [ |
53 '#type' => 'table', | 52 '#type' => 'table', |
54 '#attributes' => ['class' => ['update']], | 53 '#attributes' => ['class' => ['update']], |
55 ]; | 54 ]; |
56 } | 55 } |
57 $row_key = !empty($project['title']) ? Unicode::strtolower($project['title']) : Unicode::strtolower($project['name']); | 56 $row_key = !empty($project['title']) ? mb_strtolower($project['title']) : mb_strtolower($project['name']); |
58 | 57 |
59 // Add the project status row and details. | 58 // Add the project status row and details. |
60 $rows[$project['project_type']][$row_key]['status'] = $project_status; | 59 $rows[$project['project_type']][$row_key]['status'] = $project_status; |
61 | 60 |
62 // Add project status class attribute to the table row. | 61 // Add project status class attribute to the table row. |
229 $extra_item['attributes'] = new Attribute(); | 228 $extra_item['attributes'] = new Attribute(); |
230 $extra_item['label'] = $value['label']; | 229 $extra_item['label'] = $value['label']; |
231 $extra_item['data'] = [ | 230 $extra_item['data'] = [ |
232 '#prefix' => '<em>', | 231 '#prefix' => '<em>', |
233 '#markup' => $value['data'], | 232 '#markup' => $value['data'], |
234 '#suffix' => '</em>' | 233 '#suffix' => '</em>', |
235 ]; | 234 ]; |
236 $variables['extras'][] = $extra_item; | 235 $variables['extras'][] = $extra_item; |
237 } | 236 } |
238 } | 237 } |
239 | 238 |