@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | $delta = 0; |
214 | 214 | |
215 | - $order_class = $field_machine_name . '-delta-order'; |
|
215 | + $order_class = $field_machine_name.'-delta-order'; |
|
216 | 216 | |
217 | 217 | $current = [ |
218 | 218 | '#type' => 'table', |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $current[$entity_id] = [ |
290 | 290 | '#attributes' => [ |
291 | 291 | 'class' => ['draggable'], |
292 | - 'data-entity-id' => $entity->getEntityTypeId() . ':' . $entity_id, |
|
292 | + 'data-entity-id' => $entity->getEntityTypeId().':'.$entity_id, |
|
293 | 293 | 'data-row-id' => $delta, |
294 | 294 | ], |
295 | 295 | 'display' => $display, |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | 'url' => Url::fromRoute('entity_browser.edit_form', ['entity_type' => $entity->getEntityTypeId(), 'entity' => $entity_id]), |
339 | 339 | ], |
340 | 340 | '#attributes' => [ |
341 | - 'data-entity-id' => $entity->getEntityTypeId() . ':' . $entity->id(), |
|
341 | + 'data-entity-id' => $entity->getEntityTypeId().':'.$entity->id(), |
|
342 | 342 | 'data-row-id' => $delta, |
343 | 343 | ], |
344 | 344 | '#access' => $can_edit, |
@@ -351,10 +351,10 @@ discard block |
||
351 | 351 | 'wrapper' => $details_id, |
352 | 352 | ], |
353 | 353 | '#submit' => [[get_class($this), 'removeItemSubmit']], |
354 | - '#name' => $field_machine_name . '_remove_' . $entity_id, |
|
354 | + '#name' => $field_machine_name.'_remove_'.$entity_id, |
|
355 | 355 | '#limit_validation_errors' => [array_merge($field_parents, [$field_machine_name, 'target_id'])], |
356 | 356 | '#attributes' => [ |
357 | - 'data-entity-id' => $entity->getEntityTypeId() . ':' . $entity->id(), |
|
357 | + 'data-entity-id' => $entity->getEntityTypeId().':'.$entity->id(), |
|
358 | 358 | 'data-row-id' => $delta, |
359 | 359 | ], |
360 | 360 | '#access' => (bool) $widget_settings['field_widget_remove'], |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | } |
411 | 411 | |
412 | 412 | // Return ourself as the structure doesn't match the default. |
413 | - usort($return, function ($a, $b) { |
|
413 | + usort($return, function($a, $b) { |
|
414 | 414 | return SortArray::sortByKeyInt($a, $b, '_weight'); |
415 | 415 | }); |
416 | 416 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $data['validators']['file'] = ['validators' => $this->getFileValidators()]; |
471 | 471 | // Provide context for widgets to enhance their configuration. Currently |
472 | 472 | // we only know that "upload_location" is used. |
473 | - $data['widget_context']['upload_location'] = $settings['uri_scheme'] . '://' . $settings['file_directory']; |
|
473 | + $data['widget_context']['upload_location'] = $settings['uri_scheme'].'://'.$settings['file_directory']; |
|
474 | 474 | return $data; |
475 | 475 | } |
476 | 476 |
@@ -81,8 +81,6 @@ |
||
81 | 81 | * Field widget display plugin manager. |
82 | 82 | * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory |
83 | 83 | * The config factory. |
84 | - * @param \Drupal\Core\Image\ImageFactory $image_factory |
|
85 | - * The image factory. |
|
86 | 84 | * @param \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository |
87 | 85 | * The entity display repository service. |
88 | 86 | */ |
@@ -175,8 +175,7 @@ discard block |
||
175 | 175 | // their styles in code. |
176 | 176 | elseif ($this->fieldDefinition->getType() == 'image' && $image_style = ImageStyle::load($image_style_setting)) { |
177 | 177 | $preview_image_style = $this->t('Preview image style: @style', ['@style' => $image_style->label()]); |
178 | - } |
|
179 | - else { |
|
178 | + } else { |
|
180 | 179 | $preview_image_style = $this->t('No preview image'); |
181 | 180 | } |
182 | 181 | array_unshift($summary, $preview_image_style); |
@@ -260,8 +259,7 @@ discard block |
||
260 | 259 | if ($field_type == 'file') { |
261 | 260 | $description = $item->description; |
262 | 261 | $display_field = $item->display; |
263 | - } |
|
264 | - elseif ($field_type == 'image') { |
|
262 | + } elseif ($field_type == 'image') { |
|
265 | 263 | $alt = $item->alt; |
266 | 264 | $title = $item->title; |
267 | 265 | $width = $item->width; |
@@ -455,8 +453,7 @@ discard block |
||
455 | 453 | $extensions = isset($settings['file_extensions']) ? $settings['file_extensions'] : implode(' ', $supported_extensions); |
456 | 454 | $extensions = array_intersect(explode(' ', $extensions), $supported_extensions); |
457 | 455 | $validators['file_validate_extensions'] = [implode(' ', $extensions)]; |
458 | - } |
|
459 | - elseif (!empty($settings['file_extensions'])) { |
|
456 | + } elseif (!empty($settings['file_extensions'])) { |
|
460 | 457 | $validators['file_validate_extensions'] = [$settings['file_extensions']]; |
461 | 458 | } |
462 | 459 |