@@ -8,10 +8,7 @@ |
||
8 | 8 | |
9 | 9 | use Drupal\Component\Utility\NestedArray; |
10 | 10 | use Drupal\Core\Form\FormStateInterface; |
11 | -use Drupal\Core\TypedData\DataDefinition; |
|
12 | -use Drupal\Core\TypedData\TypedData; |
|
13 | 11 | use Drupal\entity_browser\WidgetBase; |
14 | -use Drupal\file\Plugin\Field\FieldType\FileItem; |
|
15 | 12 | |
16 | 13 | /** |
17 | 14 | * Uses a view to provide entity listing in a browser's widget. |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $uploaded_files = $form_state->getValue(['upload'], []); |
57 | 57 | $trigger = $form_state->getTriggeringElement(); |
58 | 58 | |
59 | - if (in_array('submit', $trigger['#array_parents'] )) { |
|
59 | + if (in_array('submit', $trigger['#array_parents'])) { |
|
60 | 60 | $violations = $this->runWidgetValidators($uploaded_files); |
61 | 61 | if (count($violations !== 0)) { |
62 | 62 | /** @var \Symfony\Component\Validator\ConstraintViolationListInterface $violation */ |
@@ -77,9 +77,9 @@ |
||
77 | 77 | * @param \Drupal\Core\Session\AccountInterface $current_user |
78 | 78 | * The current user. |
79 | 79 | */ |
80 | - public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user, KeyValueStoreExpirableInterface $key_value, Request $request) { |
|
81 | - parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager, $key_value, $request); |
|
82 | - $this->currentUser = $current_user; |
|
80 | + public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user, KeyValueStoreExpirableInterface $key_value, Request $request) { |
|
81 | + parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager, $key_value, $request); |
|
82 | + $this->currentUser = $current_user; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |