【发布时间】:2013-11-24 00:59:31
【问题描述】:
我的 parameters.yml 文件有:
parameters:
title:
subtitle: value
我想将value 传递给 config.yml 中的服务
my_service:
class: the_class
arguments: [ %title.subtitle%] //didn't work
arguments: [ %title['subtitle']%] //didn't work
我该怎么做?
【问题讨论】:
-
您是否尝试将标题定义为像
title: {value:'someValue', subtitle:'another value'}这样的哈希图?顺便说一句,必须引用参数引用。arguments: ['%title%']see documentation