@@ -68,8 +68,7 @@ discard block |
||
68 | 68 | if (isset($options['langcode'])) { |
69 | 69 | $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); |
70 | 70 | $langcode = $options['langcode']; |
71 | - } |
|
72 | - else { |
|
71 | + } else { |
|
73 | 72 | $langcode = NULL; |
74 | 73 | } |
75 | 74 | |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | $replacements[$original] = Url::fromRoute('entity.node.latest_version', [ |
94 | 93 | 'node' => $node->id(), |
95 | 94 | ], $url_options)->toString(); |
96 | - } |
|
97 | - else { |
|
95 | + } else { |
|
98 | 96 | $replacements[$original] = $latest->toUrl('canonical', $url_options)->toString(); |
99 | 97 | } |
100 | 98 | break; |
@@ -41,8 +41,7 @@ discard block |
||
41 | 41 | // Prefer UUIDs to other fields. |
42 | 42 | if (in_array('UUID', $ids, TRUE)) { |
43 | 43 | $id_map = ['uuid', 'UUID']; |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | foreach ($processes as $field => $process) { |
47 | 46 | if (isset($process[0]['source']) && $process[0]['source'] == $ids[0]) { |
48 | 47 | $id_map = [$field, $ids[0]]; |
@@ -59,8 +58,7 @@ discard block |
||
59 | 58 | // Create a migrate executable, which we use later to set row values. |
60 | 59 | if (function_exists('drush_log')) { |
61 | 60 | $log = new DrushLogMigrateMessage(); |
62 | - } |
|
63 | - else { |
|
61 | + } else { |
|
64 | 62 | $log = new MigrateMessage(); |
65 | 63 | } |
66 | 64 | |
@@ -106,8 +104,7 @@ discard block |
||
106 | 104 | if (!$entity->hasTranslation($langcode)) { |
107 | 105 | $entity_values = $entity->toArray(); |
108 | 106 | $translation = $entity->addTranslation($langcode, $entity_values); |
109 | - } |
|
110 | - else { |
|
107 | + } else { |
|
111 | 108 | $translation = $entity->getTranslation($langcode); |
112 | 109 | } |
113 | 110 |
@@ -92,8 +92,7 @@ |
||
92 | 92 | |
93 | 93 | if (!empty($css_classes)) { |
94 | 94 | $form_state->setValue(['attributes', 'class'], $css_classes); |
95 | - } |
|
96 | - else { |
|
95 | + } else { |
|
97 | 96 | $form_state->unsetValue(['attributes', 'class']); |
98 | 97 | } |
99 | 98 | } |
@@ -112,8 +112,7 @@ discard block |
||
112 | 112 | $name = 'drupal'; |
113 | 113 | } |
114 | 114 | $info['projects'][$name] = $this->buildProject($package); |
115 | - } |
|
116 | - elseif ($this->isLightning($package)) { |
|
115 | + } elseif ($this->isLightning($package)) { |
|
117 | 116 | $info['projects'][$name] = $this->buildProject($package); |
118 | 117 | |
119 | 118 | // The Lightning project uses semantic versioning. |
@@ -283,8 +282,7 @@ discard block |
||
283 | 282 | 'type' => 'get', |
284 | 283 | 'url' => $package['dist']['url'], |
285 | 284 | ]; |
286 | - } |
|
287 | - else { |
|
285 | + } else { |
|
288 | 286 | $download = [ |
289 | 287 | 'type' => 'git', |
290 | 288 | 'url' => str_replace('[email protected]:', 'https://github.com/', $package['source']['url']), |
@@ -17,8 +17,7 @@ |
||
17 | 17 | if (!$node->layout_builder__layout) { |
18 | 18 | $variables['attributes']['class'][] = 'container'; |
19 | 19 | } |
20 | - } |
|
21 | - else { |
|
20 | + } else { |
|
22 | 21 | $variables['attributes']['class'][] = 'container'; |
23 | 22 | } |
24 | 23 |
@@ -9,32 +9,28 @@ |
||
9 | 9 | // Set container for Meta Header |
10 | 10 | if (theme_get_setting('meta_header_full_width')) { |
11 | 11 | $variables['meta_header_width'] = 'container-fluid'; |
12 | - } |
|
13 | - else { |
|
12 | + } else { |
|
14 | 13 | $variables['meta_header_width'] = 'container'; |
15 | 14 | } |
16 | 15 | |
17 | 16 | // Set container for Navbar |
18 | 17 | if (theme_get_setting('navbar_full_width')) { |
19 | 18 | $variables['navbar_width'] = 'container-fluid'; |
20 | - } |
|
21 | - else { |
|
19 | + } else { |
|
22 | 20 | $variables['navbar_width'] = 'container'; |
23 | 21 | } |
24 | 22 | |
25 | 23 | // Set container for Header |
26 | 24 | if (theme_get_setting('header_full_width')) { |
27 | 25 | $variables['header_width'] = 'container-fluid'; |
28 | - } |
|
29 | - else { |
|
26 | + } else { |
|
30 | 27 | $variables['header_width'] = 'container'; |
31 | 28 | } |
32 | 29 | |
33 | 30 | // Set container for Footer |
34 | 31 | if (theme_get_setting('footer_full_width')) { |
35 | 32 | $variables['footer_width'] = 'container-fluid'; |
36 | - } |
|
37 | - else { |
|
33 | + } else { |
|
38 | 34 | $variables['footer_width'] = 'container'; |
39 | 35 | } |
40 | 36 | } |
@@ -9,8 +9,7 @@ |
||
9 | 9 | // Set container for Navbar |
10 | 10 | if (theme_get_setting('navbar_full_width')) { |
11 | 11 | $variables['navbar_width'] = 'container-fluid'; |
12 | - } |
|
13 | - else { |
|
12 | + } else { |
|
14 | 13 | $variables['navbar_width'] = 'container'; |
15 | 14 | } |
16 | 15 |
@@ -129,8 +129,7 @@ discard block |
||
129 | 129 | ]; |
130 | 130 | } |
131 | 131 | unset($build[$field_name]); |
132 | - } |
|
133 | - elseif ($field_name !== 'field_hero_background') { |
|
132 | + } elseif ($field_name !== 'field_hero_background') { |
|
134 | 133 | $wrapper['#children'][$field_name] = $build[$field_name]; |
135 | 134 | unset($build[$field_name]); |
136 | 135 | } |
@@ -188,8 +187,7 @@ discard block |
||
188 | 187 | if ($r + $g + $b > 382) { |
189 | 188 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
190 | 189 | $style .= 'border-color:black;color:black;'; |
191 | - } |
|
192 | - else { |
|
190 | + } else { |
|
193 | 191 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
194 | 192 | $style .= 'border-color:white;color:white;'; |
195 | 193 | } |
@@ -298,8 +296,7 @@ discard block |
||
298 | 296 | $element['field_hero_link']['widget'][0]['uri']['#suffix'] = '</div>'; |
299 | 297 | $element['field_hero_link']['widget'][0]['title']['#prefix'] = '<div class="col-6">'; |
300 | 298 | $element['field_hero_link']['widget'][0]['title']['#suffix'] = '</div>'; |
301 | - } |
|
302 | - else { |
|
299 | + } else { |
|
303 | 300 | $element['field_hero_link']['widget'][0]['uri']['#prefix'] = '<div class="col-12">'; |
304 | 301 | $element['field_hero_link']['widget'][0]['uri']['#suffix'] = '</div>'; |
305 | 302 | $element['field_hero_link']['widget'][0]['title']['#prefix'] = '<div class="col-12">'; |
@@ -329,8 +326,7 @@ discard block |
||
329 | 326 | } |
330 | 327 | if (\Drupal::moduleHandler()->moduleExists('layout_builder_modal')) { |
331 | 328 | $element[$field]['#attributes']['class'][] = 'col-4'; |
332 | - } |
|
333 | - else { |
|
329 | + } else { |
|
334 | 330 | $element[$field]['#attributes']['class'][] = 'col-6'; |
335 | 331 | } |
336 | 332 | $element['style_fields'][] = $element[$field]; |
@@ -394,8 +390,7 @@ discard block |
||
394 | 390 | unset($form['flipper']['front']['settings']['view_mode']['#options'][$view_mode]); |
395 | 391 | } |
396 | 392 | } |
397 | - } |
|
398 | - elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
393 | + } elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
399 | 394 | if (empty(Element::getVisibleChildren($form['flipper']['front']['settings']['selection']['table'])) && !$form_state->isProcessingInput()) { |
400 | 395 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
401 | 396 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_mids_entity_browser'; |
@@ -562,16 +557,14 @@ discard block |
||
562 | 557 | if (isset($category_map[$category])) { |
563 | 558 | // Already translated. |
564 | 559 | $block_info[$key]['category'] = $category_map[$category]; |
565 | - } |
|
566 | - elseif (is_string($block_info[$key]['category'])) { |
|
560 | + } elseif (is_string($block_info[$key]['category'])) { |
|
567 | 561 | // Already translated. |
568 | 562 | $block_info[$key]['category'] = $block_info[$key]['category']; |
569 | 563 | } |
570 | 564 | if (isset($label_map[$label])) { |
571 | 565 | // Already translated. |
572 | 566 | $block_info[$key]['label'] = $label_map[$label]; |
573 | - } |
|
574 | - elseif (is_string($block_info[$key]['label'])) { |
|
567 | + } elseif (is_string($block_info[$key]['label'])) { |
|
575 | 568 | // Already translated. |
576 | 569 | $block_info[$key]['label'] = $block_info[$key]['label']; |
577 | 570 | } |
@@ -28,8 +28,7 @@ discard block |
||
28 | 28 | if ($arg[0] == 'node' && isset($arg[1])) { |
29 | 29 | if ($arg[1] == 'add') { |
30 | 30 | $section = 'node-add'; |
31 | - } |
|
32 | - elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) { |
|
31 | + } elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) { |
|
33 | 32 | $section = 'node-' . $arg[2]; |
34 | 33 | } |
35 | 34 | } |
@@ -39,8 +38,7 @@ discard block |
||
39 | 38 | // Store the menu item since it has some useful information. |
40 | 39 | if ($request->attributes->get('view_id')) { |
41 | 40 | $variables['attributes']['class'][] = 'views-page'; |
42 | - } |
|
43 | - elseif ($request->attributes->get('panel')) { |
|
41 | + } elseif ($request->attributes->get('panel')) { |
|
44 | 42 | $variables['attributes']['class'][] = 'panels-page'; |
45 | 43 | } |
46 | 44 | } |