Skip to content
Snippets Groups Projects
book.services.yml 1.89 KiB
Newer Older
bcweaver's avatar
bcweaver committed
services:
  book.breadcrumb:
    class: Drupal\book\BookBreadcrumbBuilder
Brian Weaver's avatar
Brian Weaver committed
    arguments: ['@entity_type.manager', '@current_user', '@entity.repository', '@language_manager']
bcweaver's avatar
bcweaver committed
    tags:
      - { name: breadcrumb_builder, priority: 701 }
  book.manager:
    class: Drupal\book\BookManager
Michael Lee's avatar
Michael Lee committed
    arguments: ['@entity_type.manager', '@string_translation', '@config.factory', '@book.outline_storage', '@renderer', '@language_manager', '@entity.repository', '@book.backend_chained_cache', '@book.memory_cache']
bcweaver's avatar
bcweaver committed
  book.outline:
    class: Drupal\book\BookOutline
    arguments: ['@book.manager']
  book.export:
    class: Drupal\book\BookExport
Brian Weaver's avatar
Brian Weaver committed
    arguments: ['@entity_type.manager', '@book.manager', '@entity.repository']
bcweaver's avatar
bcweaver committed
  book.outline_storage:
    class: Drupal\book\BookOutlineStorage
    arguments: ['@database']
    tags:
      - { name: backend_overridable }
  access_check.book.removable:
    class: Drupal\book\Access\BookNodeIsRemovableAccessCheck
    arguments: ['@book.manager']
    tags:
      - { name: access_check, applies_to: _access_book_removable }
  cache_context.route.book_navigation:
    class: Drupal\book\Cache\BookNavigationCacheContext
Brian Weaver's avatar
Brian Weaver committed
    arguments: ['@current_route_match']
bcweaver's avatar
bcweaver committed
    calls:
      - [setContainer, ['@service_container']]
    tags:
      - { name: cache.context}

  book.uninstall_validator:
    class: Drupal\book\BookUninstallValidator
    tags:
      - { name: module_install.uninstall_validator }
    arguments: ['@book.outline_storage', '@entity_type.manager', '@string_translation']
    lazy: true
Michael Lee's avatar
Michael Lee committed
  book.memory_cache:
    class: Drupal\Core\Cache\MemoryCache\MemoryCache
  book.backend_chained_cache:
    class: Drupal\Core\Cache\BackendChain
    calls:
      - [appendBackend, ['@book.memory_cache']]
      - [appendBackend, ['@cache.data']]
    tags:
      # This tag ensures that Drupal's cache_tags.invalidator service
      # invalidates also this cache data.
      - { name: cache.bin }