function Sql::__construct

Same name in this branch
  1. 10 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct()
Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::__construct()
  2. 9 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct()
  3. 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::__construct()
  4. 8.9.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct()
  5. 11.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::__construct()
  6. 11.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::__construct()

Constructs a Sql object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\views\Plugin\views\query\DateSqlInterface $date_sql: The database-specific date handler.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

Overrides PluginBase::__construct

File

core/modules/views/src/Plugin/views/query/Sql.php, line 161

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, DateSqlInterface $date_sql, MessengerInterface $messenger) {
    // By default, use AND operator to connect WHERE groups.
    $this->groupOperator = 'AND';
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->entityTypeManager = $entity_type_manager;
    $this->dateSql = $date_sql;
    $this->messenger = $messenger;
}

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