public function EREFNodeTitles::buildOptionsForm in Entity Reference Exposed Filters 8
Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
Overrides FilterPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ filter/ EREFNodeTitles.php, line 180
Class
- EREFNodeTitles
- Filters by given list of related content title options.
Namespace
Drupal\entity_reference_exposed_filters\Plugin\views\filterCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
if (!isset($this->options['expose']['identifier'])) {
$this->options['expose']['identifier'] = $form_state
->get('id');
}
parent::buildOptionsForm($form, $form_state);
$form['relationship']['#options'] = array_intersect_key($form['relationship']['#options'], $this->getRelationships);
}