@@ -453,8 +453,7 @@ discard block |
||
453 | 453 | // and use this information to return correct part of the form. |
454 | 454 | if (!empty($trigger['#ajax']['event']) && $trigger['#ajax']['event'] == 'entity_browser_value_updated') { |
455 | 455 | $parents = array_slice($trigger['#array_parents'], 0, -1); |
456 | - } |
|
457 | - elseif ($trigger['#type'] == 'submit' && strpos($trigger['#name'], '_remove_')) { |
|
456 | + } elseif ($trigger['#type'] == 'submit' && strpos($trigger['#name'], '_remove_')) { |
|
458 | 457 | $parents = array_slice($trigger['#array_parents'], 0, -static::$deleteDepth); |
459 | 458 | } |
460 | 459 | |
@@ -621,12 +620,10 @@ discard block |
||
621 | 620 | $entity_browser_id = $this->getSetting('entity_browser'); |
622 | 621 | if (empty($entity_browser_id)) { |
623 | 622 | return [$this->t('No entity browser selected.')]; |
624 | - } |
|
625 | - else { |
|
623 | + } else { |
|
626 | 624 | if ($browser = $this->entityTypeManager->getStorage('entity_browser')->load($entity_browser_id)) { |
627 | 625 | $summary[] = $this->t('Entity browser: @browser', ['@browser' => $browser->label()]); |
628 | - } |
|
629 | - else { |
|
626 | + } else { |
|
630 | 627 | drupal_set_message($this->t('Missing entity browser!'), 'error'); |
631 | 628 | return [$this->t('Missing entity browser!')]; |
632 | 629 | } |
@@ -636,8 +633,7 @@ discard block |
||
636 | 633 | $selection_mode_options = EntityBrowserElement::getSelectionModeOptions(); |
637 | 634 | if (isset($selection_mode_options[$selection_mode])) { |
638 | 635 | $summary[] = $this->t('Selection mode: @selection_mode', ['@selection_mode' => $selection_mode_options[$selection_mode]]); |
639 | - } |
|
640 | - else { |
|
636 | + } else { |
|
641 | 637 | $summary[] = $this->t('Undefined selection mode.'); |
642 | 638 | } |
643 | 639 |