@@ -13,40 +13,35 @@ |
||
| 13 | 13 | // Make Page Mangers pages full width |
| 14 | 14 | elseif (\Drupal::routeMatch()->getRouteObject()->hasDefault('page_manager_page')) { |
| 15 | 15 | $variables['container_class'] = 'container-fluid full'; |
| 16 | - } |
|
| 17 | - else { |
|
| 16 | + } else { |
|
| 18 | 17 | $variables['container_class'] = 'container'; |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | 20 | // Set container for Meta Header |
| 22 | 21 | if (theme_get_setting('meta_header_full_width')) { |
| 23 | 22 | $variables['meta_header_width'] = 'container-fluid'; |
| 24 | - } |
|
| 25 | - else { |
|
| 23 | + } else { |
|
| 26 | 24 | $variables['meta_header_width'] = 'container'; |
| 27 | 25 | } |
| 28 | 26 | |
| 29 | 27 | // Set container for Navbar |
| 30 | 28 | if (theme_get_setting('navbar_full_width')) { |
| 31 | 29 | $variables['navbar_width'] = 'container-fluid'; |
| 32 | - } |
|
| 33 | - else { |
|
| 30 | + } else { |
|
| 34 | 31 | $variables['navbar_width'] = 'container'; |
| 35 | 32 | } |
| 36 | 33 | |
| 37 | 34 | // Set container for Header |
| 38 | 35 | if (theme_get_setting('header_full_width')) { |
| 39 | 36 | $variables['header_width'] = 'container-fluid'; |
| 40 | - } |
|
| 41 | - else { |
|
| 37 | + } else { |
|
| 42 | 38 | $variables['header_width'] = 'container'; |
| 43 | 39 | } |
| 44 | 40 | |
| 45 | 41 | // Set container for Footer |
| 46 | 42 | if (theme_get_setting('footer_full_width')) { |
| 47 | 43 | $variables['footer_width'] = 'container-fluid'; |
| 48 | - } |
|
| 49 | - else { |
|
| 44 | + } else { |
|
| 50 | 45 | $variables['footer_width'] = 'container'; |
| 51 | 46 | } |
| 52 | 47 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $hero_callout_width = $entity->get('field_callout_width')->getString(); |
| 65 | - switch($hero_callout_width) { |
|
| 65 | + switch ($hero_callout_width) { |
|
| 66 | 66 | case '03': |
| 67 | 67 | $hero_callout_width = 'col col-md-5 col-lg-3'; |
| 68 | 68 | break; |
@@ -96,12 +96,12 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $wrapper = [ |
| 99 | - '#prefix' => '<div class="container"><div class="col-12"><div class="row ' . $hero_alignment . '">', |
|
| 99 | + '#prefix' => '<div class="container"><div class="col-12"><div class="row '.$hero_alignment.'">', |
|
| 100 | 100 | '#suffix' => '</div></div></div>', |
| 101 | 101 | '#type' => 'container', |
| 102 | 102 | '#weight' => -1, |
| 103 | 103 | '#attributes' => [ |
| 104 | - 'class' => ['hero-block-fields', $hero_callout_width ], |
|
| 104 | + 'class' => ['hero-block-fields', $hero_callout_width], |
|
| 105 | 105 | ], |
| 106 | 106 | '#children' => [], |
| 107 | 107 | ]; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $icon = $build[$field_name]['#object']->field_icon->getString(); |
| 111 | 111 | if (!empty($icon)) { |
| 112 | 112 | $wrapper['#children'][$field_name] = [ |
| 113 | - '#markup' => '<i class="fa ' . $icon . ' hero-icon"></i>', |
|
| 113 | + '#markup' => '<i class="fa '.$icon.' hero-icon"></i>', |
|
| 114 | 114 | '#allowed_tags' => ['i'], |
| 115 | 115 | ]; |
| 116 | 116 | } |
@@ -123,15 +123,15 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $hero_first_line_size = $entity->get('field_first_line_size')->getString(); |
| 126 | - $wrapper['#children']['field_first_line']['#attributes']['class'][] = 'size-' . $hero_first_line_size; |
|
| 126 | + $wrapper['#children']['field_first_line']['#attributes']['class'][] = 'size-'.$hero_first_line_size; |
|
| 127 | 127 | |
| 128 | 128 | $hero_second_line_size = $entity->get('field_second_line_size')->getString(); |
| 129 | - $wrapper['#children']['field_second_line']['#attributes']['class'][] = 'size-' . $hero_second_line_size; |
|
| 129 | + $wrapper['#children']['field_second_line']['#attributes']['class'][] = 'size-'.$hero_second_line_size; |
|
| 130 | 130 | |
| 131 | 131 | // Attach styles. |
| 132 | 132 | $alignment = $entity->get('field_hero_alignment')->getString(); |
| 133 | 133 | if (preg_match('/^[a-z_]+$/i', $alignment)) { |
| 134 | - $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-' . $alignment); |
|
| 134 | + $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-'.$alignment); |
|
| 135 | 135 | } |
| 136 | 136 | $color_regex = '/^#[0-9a-f]{6}$/i'; |
| 137 | 137 | $callout_background_color = $entity->get('field_callout_background_color')->getString(); |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | $wrapper['#attributes']['style'] = $callout_background_color; |
| 145 | 145 | $text_color = $entity->get('field_text_color')->getString(); |
| 146 | 146 | if (preg_match($color_regex, $text_color)) { |
| 147 | - $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
| 148 | - $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
| 147 | + $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: '.$text_color; |
|
| 148 | + $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: '.$text_color; |
|
| 149 | 149 | } |
| 150 | 150 | if ($entity->get('field_gradient')->getString()) { |
| 151 | 151 | $gradient_color = $entity->get('field_gradient_color')->getString(); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | $callout_color = $entity->get('field_callout_color')->getString(); |
| 170 | 170 | if (preg_match($color_regex, $callout_color)) { |
| 171 | - $style = 'background-color: ' . $callout_color . ';'; |
|
| 171 | + $style = 'background-color: '.$callout_color.';'; |
|
| 172 | 172 | $hex = trim($callout_color, '#'); |
| 173 | 173 | $r = hexdec(substr($hex, 0, 2)); |
| 174 | 174 | $g = hexdec(substr($hex, 2, 2)); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | if (isset($variables['elements']['content']) && isset($variables['elements']['content']['#block_content'])) { |
| 222 | 222 | /** @var \Drupal\block_content\Entity\BlockContent $entity */ |
| 223 | 223 | $entity = $variables['elements']['content']['#block_content']; |
| 224 | - $suggestions[] = 'block__block_content__' . $entity->bundle(); |
|
| 224 | + $suggestions[] = 'block__block_content__'.$entity->bundle(); |
|
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | // 'Current @Entity_Type' category. If the block is not a field on the |
| 518 | 518 | // current entity, allow its category to be remapped. |
| 519 | 519 | if ($category === '@entity') { |
| 520 | - $block_info[$key]['category'] = $info['category']->render() . ' Fields'; |
|
| 520 | + $block_info[$key]['category'] = $info['category']->render().' Fields'; |
|
| 521 | 521 | } |
| 522 | 522 | // Place Block Content entities into categories based on their type. |
| 523 | 523 | elseif ($category === 'Custom') { |