public function Bundle::init in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::init()
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 InOperator::init
File
- core/
modules/ views/ src/ Plugin/ views/ filter/ Bundle.php, line 78 - Contains \Drupal\views\Plugin\views\filter\Bundle.
Class
- Bundle
- Filter class which allows filtering by entity bundles.
Namespace
Drupal\views\Plugin\views\filterCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
$this->entityTypeId = $this
->getEntityType();
$this->entityType = \Drupal::entityManager()
->getDefinition($this->entityTypeId);
$this->real_field = $this->entityType
->getKey('bundle');
}