You are here

public function RestrictIpServiceProvider::register in Restrict IP 8.2

Same name and namespace in other branches
  1. 3.x src/RestrictIpServiceProvider.php \Drupal\restrict_ip\RestrictIpServiceProvider::register()

*

Overrides ServiceProviderInterface::register

File

src/RestrictIpServiceProvider.php, line 14

Class

RestrictIpServiceProvider

Namespace

Drupal\restrict_ip

Code

public function register(ContainerBuilder $container) {
  $modules = $container
    ->getParameter('container.modules');
  if (isset($modules['ip2country'])) {
    $definition = $container
      ->getDefinition('restrict_ip.service');
    $definition
      ->addArgument(new Reference('user.data'));
  }
}