@@ -109,8 +109,7 @@ discard block |
||
109 | 109 | if (!empty($url_element['data-embed-url']) && $info = $this->urlEmbed()->getEmbed($url_element['data-embed-url'])) { |
110 | 110 | $url_element['data-url-provider'] = $info->getProviderName(); |
111 | 111 | } |
112 | - } |
|
113 | - catch (\Exception $e) { |
|
112 | + } catch (\Exception $e) { |
|
114 | 113 | watchdog_exception('url_embed', $e); |
115 | 114 | } |
116 | 115 | |
@@ -160,8 +159,7 @@ discard block |
||
160 | 159 | '#weight' => -10, |
161 | 160 | ); |
162 | 161 | $response->addCommand(new HtmlCommand('#url-embed-dialog-form', $form)); |
163 | - } |
|
164 | - else { |
|
162 | + } else { |
|
165 | 163 | $response->addCommand(new EditorDialogSave($values)); |
166 | 164 | $response->addCommand(new CloseModalDialogCommand()); |
167 | 165 | } |
@@ -77,8 +77,7 @@ discard block |
||
77 | 77 | $url_output = $info->getCode(); |
78 | 78 | $node->setAttribute('data-url-provider', $info->getProviderName()); |
79 | 79 | } |
80 | - } |
|
81 | - catch (\Exception $e) { |
|
80 | + } catch (\Exception $e) { |
|
82 | 81 | watchdog_exception('url_embed', $e); |
83 | 82 | } |
84 | 83 | |
@@ -100,8 +99,7 @@ discard block |
||
100 | 99 | <ul> |
101 | 100 | <li><code><drupal-url data-embed-url="https://www.youtube.com/watch?v=xxXXxxXxxxX" data-url-provider="YouTube" /></code></li> |
102 | 101 | </ul>'); |
103 | - } |
|
104 | - else { |
|
102 | + } else { |
|
105 | 103 | return $this->t('You can embed URLs.'); |
106 | 104 | } |
107 | 105 | } |
@@ -140,8 +140,7 @@ discard block |
||
140 | 140 | function ($match) { |
141 | 141 | if (\Drupal::service('url_embed')->getEmbed(Html::decodeEntities($match[1]))) { |
142 | 142 | return '<drupal-url data-embed-url="' . $match[1] . '"></drupal-url>'; |
143 | - } |
|
144 | - else { |
|
143 | + } else { |
|
145 | 144 | return $match[1]; |
146 | 145 | } |
147 | 146 | }, |
@@ -150,8 +149,7 @@ discard block |
||
150 | 149 | } |
151 | 150 | // Text chunk is done, so next chunk must be a tag. |
152 | 151 | $chunk_type = 'tag'; |
153 | - } |
|
154 | - else { |
|
152 | + } else { |
|
155 | 153 | // Only process this tag if there are no unclosed $ignore_tags. |
156 | 154 | if ($open_tag == '') { |
157 | 155 | // Check whether this tag is contained in $ignore_tags. |
@@ -182,8 +180,7 @@ discard block |
||
182 | 180 | public function tips($long = FALSE) { |
183 | 181 | if ($long) { |
184 | 182 | return $this->t('<p>You can convert plain URLs to <drupal-url> HTML elements. Those elements are later converted to embeds using "Display embedded URLs" text filter.</p>'); |
185 | - } |
|
186 | - else { |
|
183 | + } else { |
|
187 | 184 | return $this->t('You can convert plain URLs to embed elements.'); |
188 | 185 | } |
189 | 186 | } |