You are here

public function JoinPluginBase::__construct in Views (for Drupal 7) 8.3

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

Overrides PluginBase::__construct

1 call to JoinPluginBase::__construct()
Subquery::__construct in lib/Drupal/views/Plugin/views/join/Subquery.php
Constructs a Subquery object.
1 method overrides JoinPluginBase::__construct()
Subquery::__construct in lib/Drupal/views/Plugin/views/join/Subquery.php
Constructs a Subquery object.

File

lib/Drupal/views/Plugin/views/join/JoinPluginBase.php, line 146
Definition of Drupal\views\Plugin\views\join\JoinPluginBase.

Class

JoinPluginBase
Represents a join and creates the SQL necessary to implement the join.

Namespace

Drupal\views\Plugin\views\join

Code

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

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