@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $hero_callout_width = $entity->get('field_callout_width')->getString(); |
| 79 | - switch($hero_callout_width) { |
|
| 79 | + switch ($hero_callout_width) { |
|
| 80 | 80 | case '03': |
| 81 | 81 | $hero_callout_width = 'col col-md-5 col-lg-3'; |
| 82 | 82 | break; |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $wrapper = [ |
| 113 | - '#prefix' => '<div class="container"><div class="row ' . $hero_alignment . '">', |
|
| 113 | + '#prefix' => '<div class="container"><div class="row '.$hero_alignment.'">', |
|
| 114 | 114 | '#suffix' => '</div></div>', |
| 115 | 115 | '#type' => 'container', |
| 116 | 116 | '#weight' => -1, |
| 117 | 117 | '#attributes' => [ |
| 118 | - 'class' => ['hero-block-fields', $hero_callout_width ], |
|
| 118 | + 'class' => ['hero-block-fields', $hero_callout_width], |
|
| 119 | 119 | ], |
| 120 | 120 | '#children' => [], |
| 121 | 121 | ]; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $icon = $build[$field_name]['#object']->field_icon->getString(); |
| 125 | 125 | if (!empty($icon)) { |
| 126 | 126 | $wrapper['#children'][$field_name] = [ |
| 127 | - '#markup' => '<i class="fa ' . $icon . ' hero-icon"></i>', |
|
| 127 | + '#markup' => '<i class="fa '.$icon.' hero-icon"></i>', |
|
| 128 | 128 | '#allowed_tags' => ['i'], |
| 129 | 129 | ]; |
| 130 | 130 | } |
@@ -138,13 +138,13 @@ discard block |
||
| 138 | 138 | // Attach styles. |
| 139 | 139 | $alignment = $entity->get('field_hero_alignment')->getString(); |
| 140 | 140 | if (preg_match('/^[a-z_]+$/i', $alignment)) { |
| 141 | - $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-' . $alignment); |
|
| 141 | + $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('hero-block-align-'.$alignment); |
|
| 142 | 142 | } |
| 143 | 143 | $color_regex = '/^#[0-9a-f]{6}$/i'; |
| 144 | 144 | $text_color = $entity->get('field_text_color')->getString(); |
| 145 | 145 | if (preg_match($color_regex, $text_color)) { |
| 146 | - $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
| 147 | - $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
| 146 | + $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: '.$text_color; |
|
| 147 | + $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: '.$text_color; |
|
| 148 | 148 | } |
| 149 | 149 | $gradient_color = $entity->get('field_gradient_color')->getString(); |
| 150 | 150 | if (preg_match($color_regex, $gradient_color)) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | $callout_color = $entity->get('field_callout_color')->getString(); |
| 167 | 167 | if (preg_match($color_regex, $callout_color)) { |
| 168 | - $style = 'background-color: ' . $callout_color . ';'; |
|
| 168 | + $style = 'background-color: '.$callout_color.';'; |
|
| 169 | 169 | $hex = trim($callout_color, '#'); |
| 170 | 170 | $r = hexdec(substr($hex, 0, 2)); |
| 171 | 171 | $g = hexdec(substr($hex, 2, 2)); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | if (isset($variables['elements']['content']) && isset($variables['elements']['content']['#block_content'])) { |
| 219 | 219 | /** @var \Drupal\block_content\Entity\BlockContent $entity */ |
| 220 | 220 | $entity = $variables['elements']['content']['#block_content']; |
| 221 | - $suggestions[] = 'block__block_content__' . $entity->bundle(); |
|
| 221 | + $suggestions[] = 'block__block_content__'.$entity->bundle(); |
|
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | // Set up the correct pa$th for the CSV files in this module. |
| 407 | 407 | $types = ['hero', 'media']; |
| 408 | 408 | foreach ($types as $type) { |
| 409 | - $id = 'import_block_' . $type; |
|
| 409 | + $id = 'import_block_'.$type; |
|
| 410 | 410 | $definitions[$id]['source']['path'] = str_replace('..', dirname(__FILE__), $definitions[$id]['source']['path']); |
| 411 | 411 | } |
| 412 | 412 | } |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | // 'Current @Entity_Type' category. If the block is not a field on the |
| 468 | 468 | // current entity, allow its category to be remapped. |
| 469 | 469 | if ($category === '@entity') { |
| 470 | - $block_info[$key]['category'] = $info['category']->render() . ' Fields'; |
|
| 470 | + $block_info[$key]['category'] = $info['category']->render().' Fields'; |
|
| 471 | 471 | } |
| 472 | 472 | // Place Block Content entities into categories based on their type. |
| 473 | 473 | elseif ($category === 'Custom') { |