function StringArgument::init

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::init()
  2. 8.9.x core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::init()
  3. 10 core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::init()

Overrides ArgumentPluginBase::init

1 call to StringArgument::init()
StringListField::init in core/modules/options/src/Plugin/views/argument/StringListField.php
1 method overrides StringArgument::init()
StringListField::init in core/modules/options/src/Plugin/views/argument/StringListField.php

File

core/modules/views/src/Plugin/views/argument/StringArgument.php, line 34

Class

StringArgument
Argument handler for string.

Namespace

Drupal\views\Plugin\views\argument

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    if (!empty($this->definition['many to one'])) {
        $this->helper = new ManyToOneHelper($this);
        // Ensure defaults for these, during summaries and stuff:
        $this->operator = 'or';
        $this->value = [];
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.