You are here

public function PurgeUiRemoveBlockPluginsTestServiceProvider::alter in Purge 8.3

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceModifierInterface::alter

File

modules/purge_ui/tests/modules/purge_ui_remove_block_plugins_test/src/PurgeUiRemoveBlockPluginsTestServiceProvider.php, line 16

Class

PurgeUiRemoveBlockPluginsTestServiceProvider
Replaces the queuers and processors plugin managers with failing stubs.

Namespace

Drupal\purge_ui_remove_block_plugins_test

Code

public function alter(ContainerBuilder $container) {
  $purge_queuer = $container
    ->getDefinition('plugin.manager.purge.queuer');
  $purge_queuer
    ->setClass('Drupal\\purge_ui_remove_block_plugins_test\\BlackholePluginManager');
  $purge_processor = $container
    ->getDefinition('plugin.manager.purge.processor');
  $purge_processor
    ->setClass('Drupal\\purge_ui_remove_block_plugins_test\\BlackholePluginManager');
}