dothiv/DothivContentfulBundle

View on GitHub
Resources/config/services.yml

Summary

Maintainability
Test Coverage
parameters:
    dothiv_contentful.content.class: Dothiv\Bundle\ContentfulBundle\Output\Content
    dothiv_contentful.content_repository.class: Dothiv\Bundle\ContentfulBundle\Adapter\RepositoryContentAdapter
    dothiv_contentful.asset.class: Dothiv\Bundle\ContentfulBundle\Adapter\FilesystemAssetAdapter
    dothiv_contentful.service.webhook_user.class: Dothiv\Bundle\ContentfulBundle\Service\WebhookUserService
    dothiv_contentful.view_builder.class: Dothiv\Bundle\ContentfulBundle\Output\ViewBuilder
    dothiv_contentful.image_asset_scaler.class: Dothiv\Bundle\ContentfulBundle\Output\ImageAssetScaler
    dothiv_contentful.image_scaler.class: Dothiv\Bundle\ContentfulBundle\Service\ImageScaler\ImagineImageScaler
    dothiv_contentful.imagine.class: Imagine\Gd\Imagine
    dothiv_contentful.twig.extension.class: Dothiv\Bundle\ContentfulBundle\Twig\Extension\ContentfulTwigExtension
    dothiv_contentful.translation.strings_loader.class: Dothiv\Bundle\ContentfulBundle\Translation\ContentfulStringsLoader
    dothiv_contentful.request_lastmodified_cache.class: Dothiv\Bundle\ContentfulBundle\Cache\RequestLastModifiedCache
    dothiv_contentful.clock.class: Dothiv\ValueObject\ClockValue

services:
    dothiv_contentful.asset:
        class: %dothiv_contentful.asset.class%
        arguments:
          - %dothiv_contentful.web_path%
          - %dothiv_contentful.local_path%
          - @dothiv_contentful.repo.asset

    dothiv_contentful.content_repository:
        class: %dothiv_contentful.content_repository.class%
        arguments:
          - @dothiv_contentful.repo.content_type
          - @dothiv_contentful.repo.entry
          - @dothiv_contentful.repo.asset
          - @dothiv_contentful.asset

    dothiv_contentful.service.webhook_user:
        class: %dothiv_contentful.service.webhook_user.class%
        arguments:
         - %dothiv_contentful.webhook%
    
    dothiv_contentful.view_builder:
        class: %dothiv_contentful.view_builder.class%
        arguments:
            - %dothiv_contentful.default_locale%
            - @dothiv_contentful.content_repository
            - @dothiv_contentful.event_dispatcher

    dothiv_contentful.image_asset_scaler:
        class: %dothiv_contentful.image_asset_scaler.class%
        arguments:
            - %dothiv_contentful.default_locale%
            - @dothiv_contentful.asset
            - @dothiv_contentful.image_scaler

    dothiv_contentful.imagine:
        class: %dothiv_contentful.imagine.class%
        lazy: true

    dothiv_contentful.image_scaler:
        class: %dothiv_contentful.image_scaler.class%
        lazy: true
        arguments:
          - @dothiv_contentful.imagine

    dothiv_contentful.event_dispatcher:
        class: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
        arguments:
            - @service_container

    dothiv_contentful.request_lastmodified_cache:
        class: %dothiv_contentful.request_lastmodified_cache.class%
        arguments:
         - @doctrine_cache.providers.contentful_lastmodified_cache
         - @dothiv_contentful.repo.config
        tags:
         - { name: dothiv_contentful.event_listener, event: dothiv.contentful.view.create, method: onViewCreate }
         - { name: dothiv_contentful.event_listener, event: dothiv.contentful.entry.sync, method: onEntryUpdate }
        calls:
         - [ setLogger, [@logger] ]

    dothiv_contentful.clock:
        class: %dothiv_contentful.clock.class%
        arguments:
        - 'now'