Calling constants from shared to yves


#1

Hello
I defined a few constants in Pyz\Shared in a class in a module and now I’m trying to call them into the twig file in the module in Yves. Any idea how I could do it trough the factory, config and controller? Thank you


#2

Short way - pass these constants implicitly in controller, like

return [
‘timeout’ => SomeModuleConstants::DEFAULT_TIMEOUT,
];

Optionally, you could create model, which will produce this array for you.