You are here

public function ViewsDependentFilter::validateOptionsForm in Views Dependent Filters 8

Simple validate handler

Overrides FilterPluginBase::validateOptionsForm

File

src/Plugin/views/filter/ViewsDependentFilter.php, line 182

Class

ViewsDependentFilter
Filters by given list of related content title options.

Namespace

Drupal\views_dependent_filter\Plugin\views\filter

Code

public function validateOptionsForm(&$form, FormStateInterface $form_state) {
  $filters = $this->view->display_handler
    ->getHandlers('filter');
  $controller_filter = $this->options['controller_filter'];

  //kint($controller_filter);
  foreach ($filters as $key => $value) {
    if ($key == "views_dependent_filter") {
      $filters[$key]->options['expose']['identifier'] = 'views_dependent_filter';
    }
  }

  //$identifier = $filters[$controller_filter]->options['expose']['identifier'];

  //kint($identifier);

  //die();
}