Hello everyone, in my symfony 3.4 in config.yml some arbitrary parameters are defined

parameters: locale: en 

How can I access them from php code? Neither can I google.

  • The container has a getParameter() method. Use it to get your parameter. - angy_v

1 answer 1

Here is an example of getting the files_directory parameter (declared in the parameters.yml file) from the controller:

 $this->getParameter('files_directory')