function EntityReference::init
Overrides ManyToOne::init
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ EntityReference.php, line 77
Class
- EntityReference
- Filters a view by entity references.
Namespace
Drupal\views\Plugin\views\filterCode
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) : void {
parent::init($view, $display, $options);
if (empty($this->definition['field_name'])) {
$this->definition['field_name'] = $options['field'];
}
$this->definition['options callback'] = [
$this,
'getValueOptionsCallback',
];
$this->definition['options arguments'] = [
$this->getSelectionHandler($this->options['sub_handler']),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.