You are here

public function JoinPluginBase::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/join/JoinPluginBase.php \Drupal\views\Plugin\views\join\JoinPluginBase::__construct()
  2. 9 core/modules/views/src/Plugin/views/join/JoinPluginBase.php \Drupal\views\Plugin\views\join\JoinPluginBase::__construct()

Constructs a Drupal\views\Plugin\views\join\JoinPluginBase object.

Overrides PluginBase::__construct

File

core/modules/views/src/Plugin/views/join/JoinPluginBase.php, line 256

Class

JoinPluginBase

Namespace

Drupal\views\Plugin\views\join

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);

  // Merge in some default values.
  $configuration += [
    'type' => 'LEFT',
    'extra_operator' => 'AND',
    'operator' => '=',
  ];
  $this->configuration = $configuration;
  if (!empty($configuration['table'])) {
    $this->table = $configuration['table'];
  }
  $this->leftTable = $configuration['left_table'];
  if (!empty($configuration['left_field'])) {
    $this->leftField = $configuration['left_field'];
  }
  $this->field = $configuration['field'];
  if (!empty($configuration['left_formula'])) {
    $this->leftFormula = $configuration['left_formula'];
  }
  if (!empty($configuration['extra'])) {
    $this->extra = $configuration['extra'];
  }
  if (isset($configuration['adjusted'])) {
    $this->adjusted = $configuration['adjusted'];
  }
  $this->extraOperator = strtoupper($configuration['extra_operator']);
  $this->type = $configuration['type'];
}