public function TaxonomyIndexMachineName::init in Taxonomy Machine Name 8
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
Provide some extra help to get the operator/value easier to use.
This likely has to be overridden by filters which are more complex than simple operator/value.
Overrides ManyToOne::init
File
- src/
Plugin/ views/ filter/ TaxonomyIndexMachineName.php, line 81
Class
- TaxonomyIndexMachineName
- Filter by term id.
Namespace
Drupal\taxonomy_machine_name\Plugin\views\filterCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
if (!empty($this->definition['vocabulary'])) {
$this->options['vid'] = $this->definition['vocabulary'];
}
}