function NodeTermData::submitOptionsForm
Same name in other branches
- 9 core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::submitOptionsForm()
- 8.9.x core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::submitOptionsForm()
- 10 core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::submitOptionsForm()
Overrides PluginBase::submitOptionsForm
File
-
core/
modules/ taxonomy/ src/ Plugin/ views/ relationship/ NodeTermData.php, line 82
Class
- NodeTermData
- Relationship handler to return the taxonomy terms of nodes.
Namespace
Drupal\taxonomy\Plugin\views\relationshipCode
public function submitOptionsForm(&$form, FormStateInterface $form_state) {
// Transform the #type = checkboxes value to a numerically indexed array,
// because the config schema expects a sequence, not a mapping.
$vids = $form_state->getValue([
'options',
'vids',
]);
$form_state->setValue([
'options',
'vids',
], array_values(array_filter($vids)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.