In symfony2 I used config yaml below:
// config.yml
parameters:
something:
content:
price: 2.30
mainText: 'Some text here.'
redText: 'This is a text here plus price: ' %price%
The %price% is wrong and gives me an error but system tells its an array, so how to point to something['content'][price]?
Here's how you can do it
parameters:
something.content.price: 2.30
something:
content:
mainText: 'Some text here.'
redText: 'This is a text here plus price: %something.content.price%'
Here we only have 2 parameters, something.content.price that contains a float, and something that contains an array.
This means you will only be able to access directly those 2, inside the DI configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With