You are here

class RestrictIpServiceProvider in Restrict IP 3.x

Same name and namespace in other branches
  1. 8.2 src/RestrictIpServiceProvider.php \Drupal\restrict_ip\RestrictIpServiceProvider

Hierarchy

Expanded class hierarchy of RestrictIpServiceProvider

File

src/RestrictIpServiceProvider.php, line 9

Namespace

Drupal\restrict_ip
View source
class RestrictIpServiceProvider implements ServiceProviderInterface {

  /**
   * {@inheritdoc}
   */
  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'));
    }
  }

}

Members