@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | $hero_callout_width = $entity->get('field_callout_width')->getString(); |
54 | 54 | |
55 | 55 | $wrapper = [ |
56 | - '#prefix' => '<div class="content"><div class="fields-container ' . $hero_alignment . '">', |
|
56 | + '#prefix' => '<div class="content"><div class="fields-container '.$hero_alignment.'">', |
|
57 | 57 | '#suffix' => '</div></div>', |
58 | 58 | '#type' => 'container', |
59 | 59 | '#weight' => -1, |
60 | 60 | '#attributes' => [ |
61 | - 'class' => ['fields', 'col-' . $hero_callout_width, $text_alignment ], |
|
61 | + 'class' => ['fields', 'col-'.$hero_callout_width, $text_alignment], |
|
62 | 62 | ], |
63 | 63 | '#children' => [], |
64 | 64 | ]; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $icon = $build[$field_name]['#object']->field_icon->getString(); |
68 | 68 | if (!empty($icon)) { |
69 | 69 | $wrapper['#children'][$field_name] = [ |
70 | - '#markup' => '<i class="fa ' . $icon . ' hero-icon"></i>', |
|
70 | + '#markup' => '<i class="fa '.$icon.' hero-icon"></i>', |
|
71 | 71 | '#allowed_tags' => ['i'], |
72 | 72 | ]; |
73 | 73 | } |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $hero_first_line_size = $entity->get('field_first_line_size')->getString(); |
83 | - $wrapper['#children']['field_first_line']['#attributes']['class'][] = 'size-' . $hero_first_line_size; |
|
83 | + $wrapper['#children']['field_first_line']['#attributes']['class'][] = 'size-'.$hero_first_line_size; |
|
84 | 84 | |
85 | 85 | $hero_second_line_size = $entity->get('field_second_line_size')->getString(); |
86 | - $wrapper['#children']['field_second_line']['#attributes']['class'][] = 'size-' . $hero_second_line_size; |
|
86 | + $wrapper['#children']['field_second_line']['#attributes']['class'][] = 'size-'.$hero_second_line_size; |
|
87 | 87 | |
88 | 88 | // Attach styles. |
89 | 89 | $alignment = $entity->get('field_hero_alignment')->getString(); |
90 | 90 | if (preg_match('/^[a-z_]+$/i', $alignment)) { |
91 | - $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('text-align-' . $text_alignment); |
|
91 | + $wrapper['#attributes']['class'][] = Html::cleanCssIdentifier('text-align-'.$text_alignment); |
|
92 | 92 | } |
93 | 93 | $color_regex = '/^#[0-9a-f]{6}$/i'; |
94 | 94 | $callout_background_color = $entity->get('field_callout_background_color')->getString(); |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | $wrapper['#attributes']['style'] = $callout_background_color; |
102 | 102 | $text_color = $entity->get('field_text_color')->getString(); |
103 | 103 | if (preg_match($color_regex, $text_color)) { |
104 | - $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
105 | - $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: ' . $text_color; |
|
104 | + $wrapper['#children']['field_first_line']['#attributes']['style'] = 'color: '.$text_color; |
|
105 | + $wrapper['#children']['field_second_line']['#attributes']['style'] = 'color: '.$text_color; |
|
106 | 106 | } |
107 | 107 | if ($entity->get('field_gradient')->getString()) { |
108 | 108 | $gradient_color = $entity->get('field_gradient_color')->getString(); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | $callout_color = $entity->get('field_callout_color')->getString(); |
127 | 127 | if (preg_match($color_regex, $callout_color)) { |
128 | - $style = 'background-color: ' . $callout_color . ';'; |
|
128 | + $style = 'background-color: '.$callout_color.';'; |
|
129 | 129 | $hex = trim($callout_color, '#'); |
130 | 130 | $r = hexdec(substr($hex, 0, 2)); |
131 | 131 | $g = hexdec(substr($hex, 2, 2)); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | if (isset($variables['elements']['content']) && isset($variables['elements']['content']['#block_content'])) { |
179 | 179 | /** @var \Drupal\block_content\Entity\BlockContent $entity */ |
180 | 180 | $entity = $variables['elements']['content']['#block_content']; |
181 | - $suggestions[] = 'block__block_content__' . $entity->bundle(); |
|
181 | + $suggestions[] = 'block__block_content__'.$entity->bundle(); |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | // 'Current @Entity_Type' category. If the block is not a field on the |
466 | 466 | // current entity, allow its category to be remapped. |
467 | 467 | if ($category === '@entity') { |
468 | - $block_info[$key]['category'] = $info['category']->render() . ' Fields'; |
|
468 | + $block_info[$key]['category'] = $info['category']->render().' Fields'; |
|
469 | 469 | } |
470 | 470 | // Place Block Content entities into categories based on their type. |
471 | 471 | elseif ($category === 'Custom') { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | batch_set($batch); |
72 | 72 | // Set a batch to update configuration as well. |
73 | 73 | if ($batch = locale_config_batch_update_components($options, $langcodes)) { |
74 | - $batch['file'] = drupal_get_path('module', 'df_tools_translation') . '/df_tools_translation.batch.inc'; |
|
74 | + $batch['file'] = drupal_get_path('module', 'df_tools_translation').'/df_tools_translation.batch.inc'; |
|
75 | 75 | batch_set($batch); |
76 | 76 | } |
77 | 77 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | // Import each file. |
99 | 99 | foreach ($langcodes as $langcode) { |
100 | - $filepath = DRUPAL_ROOT . '/' . $path . '/translations/' . $langcode . '.po'; |
|
100 | + $filepath = DRUPAL_ROOT.'/'.$path.'/translations/'.$langcode.'.po'; |
|
101 | 101 | if (file_exists($filepath)) { |
102 | 102 | \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); |
103 | 103 | \Drupal::moduleHandler()->loadInclude('locale', 'translation.inc'); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ]); |
112 | 112 | |
113 | 113 | $original_file = (object) [ |
114 | - 'filename' => $langcode . '.po', |
|
114 | + 'filename' => $langcode.'.po', |
|
115 | 115 | 'uri' => $filepath |
116 | 116 | ]; |
117 | 117 | $file = locale_translate_file_attach_properties($original_file, $options); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $path = \Drupal::service('path.current')->getPath(); |
131 | 131 | $language = $variables['language']->getId(); |
132 | 132 | $alias = \Drupal::service('path_alias.manager')->getAliasByPath($path, $language); |
133 | - $url = Url::fromUri('internal:/' . $alias); |
|
133 | + $url = Url::fromUri('internal:/'.$alias); |
|
134 | 134 | $name = t($variables['language']->getName()); |
135 | 135 | $link = Link::fromTextAndUrl($name, $url)->toString(); |
136 | 136 | $variables['language_current_link'] = $link; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if ($langcode == 'en') { |
159 | 159 | $langcode = ''; |
160 | 160 | } |
161 | - $url = Url::fromUri('base:/' . $langcode . $alias); |
|
161 | + $url = Url::fromUri('base:/'.$langcode.$alias); |
|
162 | 162 | $current_name = t($language->getName()); |
163 | 163 | $links[] = Link::fromTextAndUrl($current_name, $url)->toString(); |
164 | 164 | } |