public function SolrDocument::validateConfigurationForm in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/search_api/datasource/SolrDocument.php \Drupal\search_api_solr\Plugin\search_api\datasource\SolrDocument::validateConfigurationForm()
- 4.x src/Plugin/search_api/datasource/SolrDocument.php \Drupal\search_api_solr\Plugin\search_api\datasource\SolrDocument::validateConfigurationForm()
Form validation handler.
Parameters
array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the complete form.
Overrides PluginFormTrait::validateConfigurationForm
See also
\Drupal\Core\Plugin\PluginFormInterface::validateConfigurationForm()
File
- src/
Plugin/ search_api/ datasource/ SolrDocument.php, line 296
Class
- SolrDocument
- Represents a datasource which exposes external Solr Documents.
Namespace
Drupal\search_api_solr\Plugin\search_api\datasourceCode
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
// We want the form fields displayed inside an "Advanced configuration"
// fieldset, but we don't want them to be actually stored inside a nested
// "advanced" key. (This could also be done via "#parents", but that's
// pretty tricky to get right in a subform.)
$values =& $form_state
->getValues();
$values += $values['advanced'];
unset($values['advanced']);
}