@@ -56,10 +56,10 @@ |
||
56 | 56 | $build = array(); |
57 | 57 | global $base_url; |
58 | 58 | header('Content-Type: application/json'); |
59 | - $json_output = (string) $this->httpClient->get($base_url . '/api/node/article')->getBody(); |
|
59 | + $json_output = (string) $this->httpClient->get($base_url.'/api/node/article')->getBody(); |
|
60 | 60 | $json_pretty = json_encode(json_decode($json_output), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); |
61 | 61 | $json_indented_by_2 = preg_replace('/^( +?)\\1(?=[^ ])/m', '$1', $json_pretty); |
62 | - $build['article_node_endpoint_block']['#markup'] = '<a data-toggle="language-json" class="button small">Expand Code</a> <div id="language-json" class="api-demo" data-toggler=".expanded"><pre><code class="language-json">' . $json_indented_by_2 . '</code></pre></div>'; |
|
62 | + $build['article_node_endpoint_block']['#markup'] = '<a data-toggle="language-json" class="button small">Expand Code</a> <div id="language-json" class="api-demo" data-toggler=".expanded"><pre><code class="language-json">'.$json_indented_by_2.'</code></pre></div>'; |
|
63 | 63 | $build['article_node_endpoint_block']['#attached']['library'][] = 'df_tools_articles/main'; |
64 | 64 | return $build; |
65 | 65 | } |