Loading src/Plugin/EntityReferenceSelection/ConfigEntityReferenceSelection.php +13 −0 Original line number Diff line number Diff line Loading @@ -162,4 +162,17 @@ class ConfigEntityReferenceSelection extends DefaultSelection { return $form; } /** * {@inheritdoc} */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { parent::validateConfigurationForm($form, $form_state); // Ensure that the allowed_ids sequence is stored without keys. $value_path = ['settings', 'handler_settings', 'filter', 'allowed_ids']; $with_keys = $form_state->getValue($value_path); $without_keys = array_values($with_keys); $form_state->setValue($value_path, $without_keys); } } Loading
src/Plugin/EntityReferenceSelection/ConfigEntityReferenceSelection.php +13 −0 Original line number Diff line number Diff line Loading @@ -162,4 +162,17 @@ class ConfigEntityReferenceSelection extends DefaultSelection { return $form; } /** * {@inheritdoc} */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { parent::validateConfigurationForm($form, $form_state); // Ensure that the allowed_ids sequence is stored without keys. $value_path = ['settings', 'handler_settings', 'filter', 'allowed_ids']; $with_keys = $form_state->getValue($value_path); $without_keys = array_values($with_keys); $form_state->setValue($value_path, $without_keys); } }