Completed
Push — 8.x-1.x ( e3e271...8a7aec )
by Janez
03:44
created
modules/entity_form/entity_browser_entity_form.module 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Implements hook_inline_entity_form_reference_form_alter().
20 20
  */
21
-function entity_browser_entity_form_inline_entity_form_reference_form_alter(&$reference_form, FormStateInterface &$form_state) {
21
+function entity_browser_entity_form_inline_entity_form_reference_form_alter(&$reference_form, FormStateInterface&$form_state) {
22 22
   /** @var \Drupal\field\FieldConfigInterface $instance */
23 23
   $instance = $form_state->get([
24 24
     'inline_entity_form',
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
   ]);
28 28
 
29 29
   /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display */
30
-  $entity_form_id = $instance->getTargetEntityTypeId() . '.' . $instance->getTargetBundle() . '.default';
30
+  $entity_form_id = $instance->getTargetEntityTypeId().'.'.$instance->getTargetBundle().'.default';
31 31
   // TODO - 'default' might become configurable or something else in the future.
32 32
   // See https://www.drupal.org/node/2510274
33 33
   $form_display = \Drupal::entityTypeManager()->getStorage('entity_form_display')->load($entity_form_id);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
   ]));
48 48
 
49 49
   $cardinality = FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED;
50
-  if($instance->getFieldStorageDefinition()->get('cardinality') !== $cardinality) {
50
+  if ($instance->getFieldStorageDefinition()->get('cardinality') !== $cardinality) {
51 51
     $cardinality = $instance->getFieldStorageDefinition()->get('cardinality') - $count_existing_selection;
52 52
   }
53 53
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
   $ief_id = $reference_form['#ief_id'];
120 120
   $form_values = NestedArray::getValue($form_state->getValues(), $reference_form['#parents']);
121 121
   $attach_entities = EntityBrowserElement::processEntityIds($form_values['entity_browser']['entity_ids']);
122
-  $entities =& $form_state->get(['inline_entity_form', $ief_id, 'entities']);
122
+  $entities = & $form_state->get(['inline_entity_form', $ief_id, 'entities']);
123 123
 
124 124
   // Determine the correct weight of the new element.
125 125
   $weight = 0;
Please login to merge, or discard this patch.