Completed
Push — 8.x-1.x ( 60fc6c...c7a909 )
by Janez
02:21
created
src/Plugin/EntityBrowser/Display/Modal.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
       '#theme_wrappers' => ['container'],
54 54
       'path' => [
55 55
         '#type' => 'hidden',
56
-        '#value' => Url::fromRoute('entity_browser.' . $this->configuration['entity_browser_id'], [], $data['query_parameters'])->toString(),
56
+        '#value' => Url::fromRoute('entity_browser.'.$this->configuration['entity_browser_id'], [], $data['query_parameters'])->toString(),
57 57
       ],
58 58
       'open_modal' => [
59 59
         '#type' => 'submit',
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     $field_name = $triggering_element['#parents'][0];
109 109
     $element_name = $this->configuration['entity_browser_id'];
110
-    $name = 'entity_browser_iframe_' . $element_name;
110
+    $name = 'entity_browser_iframe_'.$element_name;
111 111
     $content = [
112 112
       '#type' => 'html_tag',
113 113
       '#tag' => 'iframe',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     $html = drupal_render($content);
126 126
 
127 127
     $response = new AjaxResponse();
128
-    $response->addCommand(new OpenDialogCommand('#' . Html::getUniqueId($field_name . '-' . $element_name . '-dialog'), $this->configuration['link_text'], $html, [
128
+    $response->addCommand(new OpenDialogCommand('#'.Html::getUniqueId($field_name.'-'.$element_name.'-dialog'), $this->configuration['link_text'], $html, [
129 129
       'width' => 'auto',
130 130
       'height' => 'auto',
131 131
       'modal' => TRUE,
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/FieldWidgetDisplay/RenderedEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
    */
110 110
   public function calculateDependencies() {
111 111
     $dependencies = parent::calculateDependencies();
112
-    if ($view_mode = $this->entityTypeManager->getStorage('entity_view_mode')->load($this->configuration['entity_type'] . '.' . $this->configuration['view_mode'])) {
112
+    if ($view_mode = $this->entityTypeManager->getStorage('entity_view_mode')->load($this->configuration['entity_type'].'.'.$this->configuration['view_mode'])) {
113 113
       $dependencies[$view_mode->getConfigDependencyKey()][] = $view_mode->getConfigDependencyName();
114 114
     }
115 115
     return $dependencies;
Please login to merge, or discard this patch.
src/Tests/ConfigUITest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -146,9 +146,9 @@  discard block
 block discarded – undo
146 146
     $xpath = new \DOMXPath($dom);
147 147
     foreach ($commands as $command) {
148 148
       if ($command['command'] == 'insert' && $command['method'] == 'replaceWith') {
149
-        $wrapperNode = $xpath->query('//*[@id="' . ltrim($command['selector'], '#') . '"]')->item(0);
149
+        $wrapperNode = $xpath->query('//*[@id="'.ltrim($command['selector'], '#').'"]')->item(0);
150 150
         $newDom = new \DOMDocument();
151
-        @$newDom->loadHTML('<div>' . $command['data'] . '</div>');
151
+        @$newDom->loadHTML('<div>'.$command['data'].'</div>');
152 152
         $newNode = @$dom->importNode($newDom->documentElement->firstChild->firstChild, TRUE);
153 153
         $wrapperNode->parentNode->replaceChild($newNode, $wrapperNode);
154 154
         $content = $dom->saveHTML();
@@ -239,20 +239,20 @@  discard block
 block discarded – undo
239 239
     $this->assertUrl('/admin/config/content/entity_browser/test_entity_browser/selection_display', ['query' => ['js' => 'nojs']]);
240 240
 
241 241
     $this->drupalPostForm(NULL, [], 'Next');
242
-    $this->assertFieldById('edit-table-' . $first_uuid . '-label', 'upload', 'Correct value for widget label found.');
243
-    $this->assertFieldChecked('edit-table-' . $first_uuid . '-form-multiple', 'Accept multiple files option is enabled by default.');
242
+    $this->assertFieldById('edit-table-'.$first_uuid.'-label', 'upload', 'Correct value for widget label found.');
243
+    $this->assertFieldChecked('edit-table-'.$first_uuid.'-form-multiple', 'Accept multiple files option is enabled by default.');
244 244
     $this->assertText('Multiple uploads will only be accepted if the source field allows more than one value.');
245
-    $this->assertFieldById('edit-table-' . $first_uuid . '-form-upload-location', 'public://', 'Correct value for upload location found.');
246
-    $this->assertFieldByXPath("//input[@data-drupal-selector='edit-table-" . $first_uuid . "-form-submit-text']", 'Select files', 'Correct value for submit text found.');
247
-    $this->assertFieldById('edit-table-' . $second_uuid . '-label', 'entity_form', 'Correct value for widget label found.');
248
-    $this->assertOptionSelectedWithDrupalSelector('edit-table-' . $second_uuid . '-form-entity-type', 'user', 'Correct value for entity type found.');
249
-    $this->assertOptionSelectedWithDrupalSelector('edit-table-' . $second_uuid . '-form-bundle-select', 'user', 'Correct value for bundle found.');
250
-    $this->assertOptionSelectedWithDrupalSelector('edit-table-' . $second_uuid . '-form-form-mode-form-select', 'register', 'Correct value for form modes found.');
251
-    $this->assertFieldByXPath("//input[@data-drupal-selector='edit-table-" . $second_uuid . "-form-submit-text']", 'But some are more equal than others', 'Correct value for submit text found.');
245
+    $this->assertFieldById('edit-table-'.$first_uuid.'-form-upload-location', 'public://', 'Correct value for upload location found.');
246
+    $this->assertFieldByXPath("//input[@data-drupal-selector='edit-table-".$first_uuid."-form-submit-text']", 'Select files', 'Correct value for submit text found.');
247
+    $this->assertFieldById('edit-table-'.$second_uuid.'-label', 'entity_form', 'Correct value for widget label found.');
248
+    $this->assertOptionSelectedWithDrupalSelector('edit-table-'.$second_uuid.'-form-entity-type', 'user', 'Correct value for entity type found.');
249
+    $this->assertOptionSelectedWithDrupalSelector('edit-table-'.$second_uuid.'-form-bundle-select', 'user', 'Correct value for bundle found.');
250
+    $this->assertOptionSelectedWithDrupalSelector('edit-table-'.$second_uuid.'-form-form-mode-form-select', 'register', 'Correct value for form modes found.');
251
+    $this->assertFieldByXPath("//input[@data-drupal-selector='edit-table-".$second_uuid."-form-submit-text']", 'But some are more equal than others', 'Correct value for submit text found.');
252 252
 
253
-    $this->drupalPostForm(NULL, ['table[' . $first_uuid . '][form][multiple]' => FALSE], 'Finish');
253
+    $this->drupalPostForm(NULL, ['table['.$first_uuid.'][form][multiple]' => FALSE], 'Finish');
254 254
     $this->drupalGet('/admin/config/content/entity_browser/test_entity_browser/widgets');
255
-    $this->assertNoFieldChecked('edit-table-' . $first_uuid . '-form-multiple', 'Accept multiple files option is disabled.');
255
+    $this->assertNoFieldChecked('edit-table-'.$first_uuid.'-form-multiple', 'Accept multiple files option is disabled.');
256 256
 
257 257
     $this->drupalLogout();
258 258
     $this->drupalGet('/admin/config/content/entity_browser/test_entity_browser');
Please login to merge, or discard this patch.