Skip to content
Snippets Groups Projects

3180227-notice-trying-to-10

2 files
+ 29
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -155,7 +155,18 @@ public function query() {
$id_table = $this->view->storage->get('base_table');
$this->id_field_alias = $this->view->query->addField($id_table, $id_field);
$options = $this->getOption('entity_reference_options');
$options = $this->getOption('entity_reference_options') ?? [];
// The entity_reference_options are typically set during a call to
// Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::initializeView().
// If any entity_reference_options are not yet set, we apply the same
// default values that would typically be added by that method.
$default_options = [
'match' => NULL,
'match_operator' => 'CONTAINS',
'limit' => 0,
'ids' => NULL,
];
$options += $default_options;
// Restrict the autocomplete options based on what's been typed already.
if (isset($options['match'])) {
Loading