public function AddDataToSessionAction::__construct in Rules Session Variables 2.x
Same name and namespace in other branches
- 2.0.x src/Plugin/RulesAction/AddDataToSessionAction.php \Drupal\rules_session_vars\Plugin\RulesAction\AddDataToSessionAction::__construct()
Constructor for AddDataToSessionAction.
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/ AddDataToSessionAction.php, line 48
Class
- AddDataToSessionAction
- Provides a 'Add data to session' action.
Namespace
Drupal\rules_session_vars\Plugin\RulesActionCode
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;
}