I want to create the file called setting.yml and it will have data like
Route1: users
Route2 : profile
So that in my controller i can get the route1 from that Yml file
File is in /app/config/settings.yml and not included in config.yml
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do two things:
If your configuration is simple, add the values you need under a “parameters” entry, either in your main config.yml file or in a file which you import from your main config.file. For example:
Then in your controller, use this code to get one of the parameters:
Or, if you want a really flexible configuration, you can implement a semantic configuration for your bundle. See this link for all the information you will need:
http://symfony.com/doc/master/cookbook/bundles/extension.html