You are here

public function SetUserCountry::__construct in IP-based Determination of a Visitor's Country 8

Constructs a SetUserCountry 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\user\UserDataInterface $userData: The user.data service.

Overrides ContextAwarePluginBase::__construct

File

src/Plugin/RulesAction/SetUserCountry.php, line 50

Class

SetUserCountry
Provides an 'Add a country_iso_code_2 to user data' action.

Namespace

Drupal\ip2country\Plugin\RulesAction

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, UserDataInterface $userData) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->userData = $userData;
}