You are here

public function SessionDataComparison::__construct in Rules Session Variables 2.x

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Condition/SessionDataComparison.php \Drupal\rules_session_vars\Plugin\Condition\SessionDataComparison::__construct()

Constructor for SessionDataComparison.

Parameters

array $configuration: The configuration.

string $plugin_id: The plugin ID.

mixed $plugin_definition: The plugin definition.

\Symfony\Component\HttpFoundation\Request|null $request: The request.

File

src/Plugin/Condition/SessionDataComparison.php, line 57

Class

SessionDataComparison
Provides a 'Session Data Comparison' condition.

Namespace

Drupal\rules_session_vars\Plugin\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, Request $request = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->session = $request ? $request
    ->getSession() : NULL;
}