You are here

SocialLanguageServiceProvider.php in Open Social 8.2

File

modules/custom/social_language/src/SocialLanguageServiceProvider.php
View source
<?php

namespace Drupal\social_language;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
use Symfony\Component\DependencyInjection\Reference;

/**
 * Class SocialLanguageServiceProvider.
 *
 * @package Drupal\social_language
 */
class SocialLanguageServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    $definition = $container
      ->getDefinition('main_content_renderer.modal');
    $definition
      ->setClass('Drupal\\social_language\\SocialLanguageModalRenderer');
    $definition = $container
      ->getDefinition('url_generator');
    $definition
      ->setClass('Drupal\\social_language\\SocialLanguageMetadataBubblingUrlGenerator')
      ->addArgument(new Reference('language_manager'));
  }

}

Classes

Namesort descending Description
SocialLanguageServiceProvider Class SocialLanguageServiceProvider.