Same answer, different post
A bit late, but here is the solution you were looking for :P
// parameters.yml
parameters:
something:
content:
price: 2.30
mainText: 'Some text here.'
redText: 'This is a text here plus price: '
The way to use the price defined in your array would be something like:
//config.yml
twig:
globals:
fee: content['price']
Explanation:
When you import your parameters file, into your config.yml file automatically you can access to all variables defined there.
To keep in mind, when you use the structure you defined.
You are defining an key value pair array called content that contains many key and value pairs, and the way to refer to them is the one described above.
Hope this be useful for those who may be looking for this! :)
Extensionclass (symfony.com/doc/current/cookbook/bundles/extension.html). However, it takes a lot more effort, especially if you haven't worked with configuration exposing before.