public function EntityQueueRelationship::init in Entityqueue 8
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
Init handler to let relationships live on tables other than the table they operate on.
Overrides RelationshipPluginBase::init
File
- src/
Plugin/ views/ relationship/ EntityQueueRelationship.php, line 93
Class
- EntityQueueRelationship
- A relationship handler for entity queues.
Namespace
Drupal\entityqueue\Plugin\views\relationshipCode
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
// Add an extra condition to limit results based on the queue selection.
if ($this->options['limit_queue']) {
$this->definition['extra'][] = [
'field' => 'bundle',
'value' => $this->options['limit_queue'],
];
}
}