@@ -99,8 +99,7 @@ discard block |
||
99 | 99 | public function getTypeLabel() { |
100 | 100 | if ($definition = $this->embedTypeManager()->getDefinition($this->getTypeId(), FALSE)) { |
101 | 101 | return $definition['label']; |
102 | - } |
|
103 | - else { |
|
102 | + } else { |
|
104 | 103 | return t('Unknown'); |
105 | 104 | } |
106 | 105 | } |
@@ -129,8 +128,7 @@ discard block |
||
129 | 128 | public function getIconUrl() { |
130 | 129 | if ($image = $this->getIconFile()) { |
131 | 130 | return $image->url(); |
132 | - } |
|
133 | - else { |
|
131 | + } else { |
|
134 | 132 | return $this->getTypePlugin()->getDefaultIconUrl(); |
135 | 133 | } |
136 | 134 | } |
@@ -213,8 +211,7 @@ discard block |
||
213 | 211 | public function getTypeSetting($key, $default = NULL) { |
214 | 212 | if (isset($this->type_settings[$key])) { |
215 | 213 | return $this->type_settings[$key]; |
216 | - } |
|
217 | - else { |
|
214 | + } else { |
|
218 | 215 | return $default; |
219 | 216 | } |
220 | 217 | } |
@@ -135,8 +135,7 @@ discard block |
||
135 | 135 | if ($plugin = $button->getTypePlugin()) { |
136 | 136 | $form['type_settings'] = $plugin->buildConfigurationForm($form['type_settings'], $form_state); |
137 | 137 | } |
138 | - } |
|
139 | - catch (PluginNotFoundException $exception) { |
|
138 | + } catch (PluginNotFoundException $exception) { |
|
140 | 139 | drupal_set_message($exception->getMessage(), 'error'); |
141 | 140 | watchdog_exception('embed', $exception); |
142 | 141 | $form['type_id']['#disabled'] = FALSE; |
@@ -215,8 +214,7 @@ discard block |
||
215 | 214 | // in the config entity. |
216 | 215 | if (!empty($icon_fid) && $file = $this->entityManager->getStorage('file')->load($icon_fid)) { |
217 | 216 | $button->set('icon_uuid', $file->uuid()); |
218 | - } |
|
219 | - else { |
|
217 | + } else { |
|
220 | 218 | $button->set('icon_uuid', NULL); |
221 | 219 | } |
222 | 220 | |
@@ -226,8 +224,7 @@ discard block |
||
226 | 224 | |
227 | 225 | if ($status == SAVED_UPDATED) { |
228 | 226 | drupal_set_message(t('The embed button %label has been updated.', $t_args)); |
229 | - } |
|
230 | - elseif ($status == SAVED_NEW) { |
|
227 | + } elseif ($status == SAVED_NEW) { |
|
231 | 228 | drupal_set_message(t('The embed button %label has been added.', $t_args)); |
232 | 229 | $context = array_merge($t_args, array('link' => $button->link($this->t('View'), 'collection'))); |
233 | 230 | $this->logger('embed')->notice('Added embed button %label.', $context); |
@@ -54,8 +54,7 @@ |
||
54 | 54 | $configuration = $this->getConfiguration(); |
55 | 55 | if (array_key_exists($name, $configuration)) { |
56 | 56 | return $configuration[$name]; |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | return $default; |
60 | 59 | } |
61 | 60 | } |
@@ -54,8 +54,7 @@ |
||
54 | 54 | $configuration = $this->getConfiguration(); |
55 | 55 | if (array_key_exists($name, $configuration)) { |
56 | 56 | return $configuration[$name]; |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | return $default; |
60 | 59 | } |
61 | 60 | } |
@@ -54,8 +54,7 @@ |
||
54 | 54 | $configuration = $this->getConfiguration(); |
55 | 55 | if (array_key_exists($name, $configuration)) { |
56 | 56 | return $configuration[$name]; |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | return $default; |
60 | 59 | } |
61 | 60 | } |