@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | // Don't show this element in the context of an admin menu. |
57 | 57 | if (!isset($form['admin_label'])) { |
58 | 58 | $form['value']['#suffix'] = |
59 | - '<a class="simple-proximity-location-button button" title="' . $this->t('Use your current location') . '">' . |
|
60 | - ' <i class="fa fa-map-marker" aria-hidden="true"></i>' . |
|
61 | - '</a>' . $form['value']['#suffix']; |
|
59 | + '<a class="simple-proximity-location-button button" title="'.$this->t('Use your current location').'">'. |
|
60 | + ' <i class="fa fa-map-marker" aria-hidden="true"></i>'. |
|
61 | + '</a>'.$form['value']['#suffix']; |
|
62 | 62 | $form['value']['#attached'] = ['library' => ['df_tools_map/main']]; |
63 | 63 | } |
64 | 64 | } |
@@ -109,15 +109,15 @@ discard block |
||
109 | 109 | |
110 | 110 | // Geocode the location if it's present. |
111 | 111 | if (!empty($location)) { |
112 | - if ($collection = \Drupal::service('geocoder')->geocode($location,['googlemaps'])) { |
|
112 | + if ($collection = \Drupal::service('geocoder')->geocode($location, ['googlemaps'])) { |
|
113 | 113 | $coordinates = $collection->first()->getCoordinates(); |
114 | 114 | |
115 | 115 | // Generate a distance formula programatically. |
116 | 116 | $haversine_options = [ |
117 | 117 | 'origin_latitude' => $coordinates->getLatitude(), |
118 | 118 | 'origin_longitude' => $coordinates->getLongitude(), |
119 | - 'destination_latitude' => $this->table . '.' . $this->realField . '_lat', |
|
120 | - 'destination_longitude' => $this->table . '.' . $this->realField . '_lon', |
|
119 | + 'destination_latitude' => $this->table.'.'.$this->realField.'_lat', |
|
120 | + 'destination_longitude' => $this->table.'.'.$this->realField.'_lon', |
|
121 | 121 | 'earth_radius' => GEOFIELD_KILOMETERS, |
122 | 122 | ]; |
123 | 123 | |
@@ -125,13 +125,13 @@ discard block |
||
125 | 125 | |
126 | 126 | /** @var \Drupal\views\Plugin\views\query\Sql $query */ |
127 | 127 | $query = $this->query; |
128 | - $query->addOrderBy(NULL, $formula, 'ASC', $this->table . '_simple_proximity'); |
|
128 | + $query->addOrderBy(NULL, $formula, 'ASC', $this->table.'_simple_proximity'); |
|
129 | 129 | |
130 | 130 | // Add a where expression if a distance is used. |
131 | 131 | if ($this->options['expose']['distance']) { |
132 | 132 | $distance = $this->options['expose']['distance']; |
133 | - $placeholder = $query->placeholder($this->table . '_simple_proximity'); |
|
134 | - $query->addWhereExpression(0, '(' . $formula . ' <= ' . $placeholder . ')', [$placeholder => $distance]); |
|
133 | + $placeholder = $query->placeholder($this->table.'_simple_proximity'); |
|
134 | + $query->addWhereExpression(0, '('.$formula.' <= '.$placeholder.')', [$placeholder => $distance]); |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | } |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | |
151 | 151 | foreach ($options as $key => $option) { |
152 | 152 | if (is_numeric($option)) { |
153 | - $formula = str_replace(':' . $key, $option, $formula); |
|
153 | + $formula = str_replace(':'.$key, $option, $formula); |
|
154 | 154 | } |
155 | 155 | else { |
156 | - $formula = str_replace(':' . $key, $connection->escapeField($option), $formula); |
|
156 | + $formula = str_replace(':'.$key, $connection->escapeField($option), $formula); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $request = \Drupal::request(); |
19 | 19 | |
20 | 20 | // Add language body class. |
21 | - $variables['attributes']['class'][] = 'lang-' . $site_language; |
|
21 | + $variables['attributes']['class'][] = 'lang-'.$site_language; |
|
22 | 22 | |
23 | 23 | // Classes for body element. Allows advanced theming based on context |
24 | 24 | $is_front_page = \Drupal::service('path.matcher')->isFrontPage(); |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $section = 'node-add'; |
33 | 33 | } |
34 | 34 | elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) { |
35 | - $section = 'node-' . $arg[2]; |
|
35 | + $section = 'node-'.$arg[2]; |
|
36 | 36 | } |
37 | 37 | } |
38 | - $variables['attributes']['class'][] = Html::getClass('section-' . $section); |
|
38 | + $variables['attributes']['class'][] = Html::getClass('section-'.$section); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // Store the menu item since it has some useful information. |