protected function EntityReference::valueForm in Views Entity Reference Filter 8
Options form subform for setting options.
This should be overridden by all child classes and it must define $form['value']
Overrides InOperator::valueForm
See also
buildOptionsForm()
File
- src/
Plugin/ views/ filter/ EntityReference.php, line 142
Class
- EntityReference
- Provides a Views filter for entity reference fields.
Namespace
Drupal\verf\Plugin\views\filterCode
protected function valueForm(&$form, FormStateInterface $form_state) {
parent::valueForm($form, $form_state);
// Apply cacheability metadata, because the parent class does not.
// @todo Remove this once https://www.drupal.org/node/2754103 is fixed.
$cacheability_metdata = CacheableMetadata::createFromObject($this);
$cacheability_metdata
->applyTo($form);
return $form;
}