You are here

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

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

Constructor for RemoveDataFromSessionAction.

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/RulesAction/RemoveDataFromSessionAction.php, line 45

Class

RemoveDataFromSessionAction
Provides a 'Remove data from session' action.

Namespace

Drupal\rules_session_vars\Plugin\RulesAction

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;
}