mardi 21 février 2017

find usage of string in symfony code programatically

I'm working on a bundle that provide parameters management (a simple key|value table for the beginning). I would like to be able to tell people before they delete a parameter that the parameter is used.

for example : I have a parameter mykey = "hello world" defined in my table.

In another bundle, I use the variable like this : $this->get("my.parameters")->getValue("mykey","myDefaultValue","myContext");

if the user wants to edit or delete mykey i Would like to tell him that in the code, this variable is used (and if possible, give him the context).

The parameters will be used in controllers and services. How can I do that?





Aucun commentaire:

Enregistrer un commentaire