function Bundle::init
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::init()
- 10 core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::init()
- 11.x core/modules/views/src/Plugin/views/filter/Bundle.php \Drupal\views\Plugin\views\filter\Bundle::init()
Overrides InOperator::init
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ Bundle.php, line 85
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::entityTypeManager()->getDefinition($this->entityTypeId);
$this->real_field = $this->entityType
->getKey('bundle');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.