registerTest example


class CoreServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {

  /** * {@inheritdoc} */
  public function register(ContainerBuilder $container) {
    $this->registerTest($container);

    // Only register the private file stream wrapper if a file path has been set.     if (Settings::get('file_private_path')) {
      $container->register('stream_wrapper.private', 'Drupal\Core\StreamWrapper\PrivateStream')
        ->addTag('stream_wrapper', ['scheme' => 'private']);
    }

    // Add the compiler pass that lets service providers modify existing     // service definitions. This pass must come first so that later     // list-building passes are operating on the post-alter services list.     $container->addCompilerPass(new ModifyServiceDefinitionsPass());

    
Home | Imprint | This part of the site doesn't use cookies.