@@ -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']), |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | $wrapper = [ |
79 | - '#prefix' => '<div class="container"><div class="row ' . $hero_alignment . '">', |
|
79 | + '#prefix' => '<div class="container"><div class="row '.$hero_alignment.'">', |
|
80 | 80 | '#suffix' => '</div></div>', |
81 | 81 | '#type' => 'container', |
82 | 82 | '#weight' => -1, |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $icon = $build[$field_name]['#object']->field_icon->getString(); |
91 | 91 | if (!empty($icon)) { |
92 | 92 | $wrapper['#children'][$field_name] = [ |
93 | - '#markup' => '<i class="fa ' . $icon . ' hero-icon"></i>', |
|
93 | + '#markup' => '<i class="fa '.$icon.' hero-icon"></i>', |
|
94 | 94 | '#allowed_tags' => ['i'], |
95 | 95 | ]; |
96 | 96 | } |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | // Attach styles. |
105 | 105 | $alignment = $entity->get('field_hero_alignment')->getString(); |
106 | 106 | if (preg_match('/^[a-z_]+$/i', $alignment)) { |
107 | - $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-' . $alignment); |
|
107 | + $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-'.$alignment); |
|
108 | 108 | } |
109 | 109 | $color_regex = '/^#[0-9a-f]{6}$/i'; |
110 | 110 | $text_color = $entity->get('field_text_color')->getString(); |
111 | 111 | if (preg_match($color_regex, $text_color)) { |
112 | - $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
113 | - $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
112 | + $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: '.$text_color; |
|
113 | + $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: '.$text_color; |
|
114 | 114 | } |
115 | 115 | $gradient_color = $entity->get('field_gradient_color')->getString(); |
116 | 116 | if (preg_match($color_regex, $gradient_color)) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | $callout_color = $entity->get('field_callout_color')->getString(); |
133 | 133 | if (preg_match($color_regex, $callout_color)) { |
134 | - $style = 'background-color: ' . $callout_color . ';'; |
|
134 | + $style = 'background-color: '.$callout_color.';'; |
|
135 | 135 | $hex = trim($callout_color, '#'); |
136 | 136 | $r = hexdec(substr($hex, 0, 2)); |
137 | 137 | $g = hexdec(substr($hex, 2, 2)); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | if (isset($variables['elements']['content']) && isset($variables['elements']['content']['#block_content'])) { |
185 | 185 | /** @var \Drupal\block_content\Entity\BlockContent $entity */ |
186 | 186 | $entity = $variables['elements']['content']['#block_content']; |
187 | - $suggestions[] = 'block__block_content__' . $entity->bundle(); |
|
187 | + $suggestions[] = 'block__block_content__'.$entity->bundle(); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | // Set up the correct pa$th for the CSV files in this module. |
373 | 373 | $types = ['hero', 'media']; |
374 | 374 | foreach ($types as $type) { |
375 | - $id = 'import_block_' . $type; |
|
375 | + $id = 'import_block_'.$type; |
|
376 | 376 | $definitions[$id]['source']['path'] = str_replace('..', dirname(__FILE__), $definitions[$id]['source']['path']); |
377 | 377 | } |
378 | 378 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | // 'Current @Entity_Type' category. If the block is not a field on the |
434 | 434 | // current entity, allow its category to be remapped. |
435 | 435 | if ($category === '@entity') { |
436 | - $block_info[$key]['category'] = $info['category']->render() . ' Fields'; |
|
436 | + $block_info[$key]['category'] = $info['category']->render().' Fields'; |
|
437 | 437 | } |
438 | 438 | // Place Block Content entities into categories based on their type. |
439 | 439 | elseif ($category === 'Custom') { |
@@ -95,8 +95,7 @@ discard block |
||
95 | 95 | ]; |
96 | 96 | } |
97 | 97 | unset($build[$field_name]); |
98 | - } |
|
99 | - elseif ($field_name !== 'field_hero_background') { |
|
98 | + } elseif ($field_name !== 'field_hero_background') { |
|
100 | 99 | $wrapper['#children'][$field_name] = $build[$field_name]; |
101 | 100 | unset($build[$field_name]); |
102 | 101 | } |
@@ -139,8 +138,7 @@ discard block |
||
139 | 138 | if ($r + $g + $b > 382) { |
140 | 139 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
141 | 140 | $style .= 'border-color:black;color:black;'; |
142 | - } |
|
143 | - else { |
|
141 | + } else { |
|
144 | 142 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
145 | 143 | $style .= 'border-color:white;color:white;'; |
146 | 144 | } |
@@ -274,8 +272,7 @@ discard block |
||
274 | 272 | unset($form['flipper']['front']['settings']['view_mode']['#options'][$view_mode]); |
275 | 273 | } |
276 | 274 | } |
277 | - } |
|
278 | - elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
275 | + } elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
279 | 276 | if (empty(Element::getVisibleChildren($form['flipper']['front']['settings']['selection']['table'])) && !$form_state->isProcessingInput()) { |
280 | 277 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
281 | 278 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_mids_entity_browser'; |
@@ -453,16 +450,14 @@ discard block |
||
453 | 450 | if (isset($category_map[$category])) { |
454 | 451 | // Already translated. |
455 | 452 | $block_info[$key]['category'] = $category_map[$category]; |
456 | - } |
|
457 | - elseif (is_string($block_info[$key]['category'])) { |
|
453 | + } elseif (is_string($block_info[$key]['category'])) { |
|
458 | 454 | // Already translated. |
459 | 455 | $block_info[$key]['category'] = $block_info[$key]['category']; |
460 | 456 | } |
461 | 457 | if (isset($label_map[$label])) { |
462 | 458 | // Already translated. |
463 | 459 | $block_info[$key]['label'] = $label_map[$label]; |
464 | - } |
|
465 | - elseif (is_string($block_info[$key]['label'])) { |
|
460 | + } elseif (is_string($block_info[$key]['label'])) { |
|
466 | 461 | // Already translated. |
467 | 462 | $block_info[$key]['label'] = $block_info[$key]['label']; |
468 | 463 | } |
@@ -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 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | function one_theme_suggestions_menu_alter(&$suggestions, array $variables) { |
25 | 25 | if (isset($variables['attributes']['region'])) { |
26 | - $suggestions[] = 'menu__' . $variables['attributes']['region']; |
|
27 | - $suggestions[] = 'menu__' . $variables['menu_name'] . '__' . $variables['attributes']['region']; |
|
26 | + $suggestions[] = 'menu__'.$variables['attributes']['region']; |
|
27 | + $suggestions[] = 'menu__'.$variables['menu_name'].'__'.$variables['attributes']['region']; |
|
28 | 28 | } |
29 | 29 | } |
@@ -13,6 +13,6 @@ |
||
13 | 13 | $view_mode = $element['#view_mode']; |
14 | 14 | |
15 | 15 | foreach ($original_suggestions as $suggestion) { |
16 | - $suggestions[] = $suggestion . '__' . $view_mode; |
|
16 | + $suggestions[] = $suggestion.'__'.$view_mode; |
|
17 | 17 | } |
18 | 18 | } |