BackendCompilerPass

Defines a compiler pass to allow automatic override per backend.

A module developer has to tag his backend service with "backend_overridable":

custom_service:
  class: ...
  tags:
    - { name: backend_overridable }

As a site admin you set the 'default_backend' in your services.yml file:

parameters:
  default_backend: sqlite

As a developer for alternative storage engines you register a service with $yourbackend.$original_service:

sqlite.custom_service:
  class: ...

Hierarchy

  • class \Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass implements CompilerPassInterface

File

core/lib/Drupal/Core/DependencyInjection/Compiler/BackendCompilerPass.php, line 34

Namespace

Drupal\Core\DependencyInjection\Compiler

Members

Name Modifiers Type Description
BackendCompilerPass::process public function You can modify the container here before it is dumped to PHP code. Overrides CompilerPassInterface::process
doc_Drupal
2016-10-29 08:45:21
Comments
Leave a Comment

Please login to continue.