什么是" sonata.block.container.types" SonataPageBundle中的参数

时间:2014-04-12 18:22:26

标签: symfony symfony-sonata

我通过composer安装了SonataPageBundle:

    "sonata-project/page-bundle": "dev-master",

安装并完成official tutorial的所有步骤后,我遇到了此错误:

 [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]                                                                                                  
 The service "sonata.page.admin.block" has a dependency on a non-existent parameter "sonata.block.container.types". Did you mean this: "sonata.page.block.container.class"? 

我在文档中没有找到有关此参数的任何信息。我应该配置什么和在哪里?

就目前而言,我的配置文件如下所示:

# app/config/config.yml
sonata_block:
    default_contexts: [cms]
    context_manager: sonata.page.block.context_manager
    blocks:
        # Enable the SonataAdminBundle block
        sonata.admin.block.admin_list:
            contexts:   [admin]
        ivfhope.block.latest_news: ~
        ivfhope.block.tag_cloud: ~
        # Your other blocks


sonata_media:
    default_context: default
    db_driver: doctrine_orm

    providers:
        image:
            resizer: sonata.media.resizer.center

    contexts:
        service_category:
            providers: [sonata.media.provider.image]
            formats:
                small: { width: 78, height: 65, quality: 95 }
        default:  # the default context is mandatory
            providers:
                - sonata.media.provider.dailymotion
                - sonata.media.provider.youtube
                - sonata.media.provider.image
                - sonata.media.provider.file

            formats:
                small: { width: 100 , quality: 70}
                big:   { width: 500 , quality: 70}

    cdn:
        server:
            path: /uploads/media # http://media.sonata-project.org/

    filesystem:
        local:
            directory:  %kernel.root_dir%/../web/uploads/media
            create:     false


sonata_page:
    multisite: host
    default_template: default # template key from templates section, used as default for
    templates:
        default:  { path: '::three_columns.html.twig', name: 'default' }
        two_columns: { path: '::two_columns.html.twig', name: '2 columns layout' }

    use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
    ignore_route_patterns:
        - ^(.*)admin(.*)   # ignore admin route, ie route containing 'admin'
        - ^_(.*)          # ignore symfony routes

    ignore_routes:
        - sonata_page_cache_esi
        - sonata_page_cache_ssi
        - sonata_page_js_sync_cache
        - sonata_page_js_async_cache
        - sonata_cache_esi
        - sonata_cache_ssi
        - sonata_cache_js_async
        - sonata_cache_js_sync
        - sonata_cache_apc

    ignore_uri_patterns:
        - ^/admin\/   # ignore admin route, ie route containing 'admin'

    page_defaults:
        homepage: {decorate: false} # disable decoration for homepage, key - is a page route


sonata_admin:
    templates:
        layout: '::admin_layout.html.twig'

cmf_routing:
    chain:
        routers_by_id:
            # enable the DynamicRouter with high priority to allow overwriting configured routes with content
            #cmf_routing.dynamic_router: 200
            # enable the symfony default router with a lower priority
            sonata.page.router: 150
            router.default: 100

1 个答案:

答案 0 :(得分:1)

我认为您还需要更新SonataBlockBundle。