1

I would like to use a function defined in (active) custom theme (i.e. mytheme.theme) in a Drush command which is defined in a custom module, but it does not seem to be available and I cannot find a way to access it.

Can this be done, and how?

Vladimir MS
  • 136
  • 6
  • 2
    Put the function in a service and then inject the service into your custom command. – leymannx Apr 28 '22 at 19:17
  • Indeed :-) I took the advice immediately, works like a charm and I do like the approach. You should have posted this as an answer. – Vladimir MS May 10 '22 at 11:12

0 Answers0