@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | global $base_url; |
63 | 63 | |
64 | 64 | header('Content-Type: application/json'); |
65 | - $json_output = (string) $this->httpClient->get($base_url . '/api/node/article')->getBody(); |
|
65 | + $json_output = (string) $this->httpClient->get($base_url.'/api/node/article')->getBody(); |
|
66 | 66 | $json_pretty = json_encode(json_decode($json_output), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); |
67 | 67 | $json_indented_by_2 = preg_replace('/^( +?)\\1(?=[^ ])/m', '$1', $json_pretty); |
68 | 68 | |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | <button class="btn btn-primary button button--primary coh-style-link-button |
72 | 72 | coh-style-link-button-color open-apiModal">Expand API Response</button> |
73 | 73 | <div class="apiResponse"> |
74 | - <pre><code class="language-json">' . $json_indented_by_2 . '</code></pre> |
|
74 | + <pre><code class="language-json">' . $json_indented_by_2.'</code></pre> |
|
75 | 75 | </div> |
76 | 76 | <div class="apiResponseModal"> |
77 | - <pre><code class="language-json">' . $json_indented_by_2 . '</code></pre> |
|
77 | + <pre><code class="language-json">' . $json_indented_by_2.'</code></pre> |
|
78 | 78 | </div> |
79 | 79 | </div>', |
80 | 80 | '#attached' => ['library' => ['df_tools_article/main']], |
@@ -82,8 +82,7 @@ discard block |
||
82 | 82 | 'effect' => 'fade', |
83 | 83 | ], |
84 | 84 | ]; |
85 | - } |
|
86 | - else { |
|
85 | + } else { |
|
87 | 86 | $form['source_proximity_filter_warning'] = [ |
88 | 87 | '#type' => 'html_tag', |
89 | 88 | '#tag' => 'div', |
@@ -149,8 +148,7 @@ discard block |
||
149 | 148 | "lon" => $coordinates->getLongitude(), |
150 | 149 | ]; |
151 | 150 | } |
152 | - } |
|
153 | - catch (\Exception $e) { |
|
151 | + } catch (\Exception $e) { |
|
154 | 152 | $this->getLogger('df_tools_map')->error($e->getMessage()); |
155 | 153 | } |
156 | 154 | } |
@@ -14,18 +14,15 @@ |
||
14 | 14 | $build = []; |
15 | 15 | if ($this->currentUser()->isAnonymous()) { |
16 | 16 | $build['form'] = $this->formBuilder()->getForm(UserLoginForm::class); |
17 | - } |
|
18 | - else { |
|
17 | + } else { |
|
19 | 18 | if (\Drupal::moduleHandler()->moduleExists('moderation_dashboard') |
20 | 19 | && $this->currentUser()->hasPermission('use moderation dashboard')) { |
21 | 20 | // Permitted users are directed to their moderation dashboard. |
22 | 21 | return $this->redirect('view.moderation_dashboard.page_1', ['user' => $this->currentUser()->id()]); |
23 | - } |
|
24 | - elseif ($this->currentUser()->hasPermission('access content overview')) { |
|
22 | + } elseif ($this->currentUser()->hasPermission('access content overview')) { |
|
25 | 23 | // Permitted users are directed to the admin content page. |
26 | 24 | return $this->redirect('view.content.page_1'); |
27 | - } |
|
28 | - else { |
|
25 | + } else { |
|
29 | 26 | $build['heading'] = [ |
30 | 27 | '#type' => 'markup', |
31 | 28 | '#markup' => $this->t('This site has no homepage content.'), |