I'm stuck with the package nelmio/alice (Expressive fixtures generator). I don't know how to parse a parameter from the general config/parameters.yml
(in my case 'photoupload_directory') file into the fixtures.yml
.
Now I have something hard coded like this:
photo: <Image('/Users/vivi/projects.2016/cvsymfony.local/storage/uploads/photos',1080,800,false,false)>
...
I tried already:
photo:
<Image(getParameter('photoupload_directory'),1080,800,false,false)>
but this is not working either. I also tried
$this->getParameter and $this->getContainer()->getParameter
or the %photoupload_directory%
notation).
Already searched the internet but so far nothing found.
Yes finally one solution, probably there are more (for parsing the parameters to this class), so if you know let me know. Below worked for me..
First add the name space ContainerAwareInterface :
Add the Trait (in the class):
Create the function:
In the fixtures.yml