public function ViewsBundle::build

Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build().

Overrides Bundle::build

File

drupal/core/modules/views/lib/Drupal/views/ViewsBundle.php, line 22
Definition of Drupal\views\ViewsBundle.

Class

ViewsBundle
Views dependency injection container.

Namespace

Drupal\views

Code

public function build(ContainerBuilder $container) {
  foreach (ViewExecutable::getPluginTypes() as $type) {
    if ($type == 'join') {
      $container
        ->register('plugin.manager.views.join', 'Drupal\\views\\Plugin\\Type\\JoinManager');
    }
    elseif ($type == 'wizard') {
      $container
        ->register('plugin.manager.views.wizard', 'Drupal\\views\\Plugin\\Type\\WizardManager');
    }
    else {
      $container
        ->register("plugin.manager.views.{$type}", 'Drupal\\views\\Plugin\\Type\\PluginManager')
        ->addArgument($type);
    }
  }
}