You are here

ConsumerImageStylesServiceProvider.php in Consumer Image Styles 4.x

Same filename and directory in other branches
  1. 8.3 src/ConsumerImageStylesServiceProvider.php

File

src/ConsumerImageStylesServiceProvider.php
View source
<?php

namespace Drupal\consumer_image_styles;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;

/**
 * Replace the resource type repository for our own configurable version.
 */
class ConsumerImageStylesServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    if ($container
      ->has('serializer.normalizer.link_collection.jsonapi')) {
      $container
        ->getDefinition('serializer.normalizer.link_collection.jsonapi')
        ->clearTags();
    }
  }

}

Classes

Namesort descending Description
ConsumerImageStylesServiceProvider Replace the resource type repository for our own configurable version.