lcollong
FabriKant d'applications web
Hi,
Finally, I'am currently doing my first real migration from F3/J3 to F4/J4. Up to now evertything is going smoothly. However I think we miss a class initialization.
I'm using the Custom class in /libraries/fabrik/fabrik/fabrik/Helpers/Custom.php to load static function reachable from where ever you are (eval, calc, default values, etc..).
There is a function called __initStatic used to initialize all static variables which can be used in the custom static functions.
For example, for a default value in an element I use :
return \Fabrik\Helpers\Custom::getParametre('default_session_size');
"getParametre" allows to retrieve my application parameters from a private array. This array is initialized inside the __initStatic func.
The problem is that it is never initialized. If I add the following line :
\Fabrik\Helpers\Custom::__initStatic();
somewhere in the form, everything works as in F3. But I think this should be called by Fabrik's model as part as helpers setup.
I don't know where it was initialized in F3. Any idea so I could add it as part of the F4 setup ?
Finally, I'am currently doing my first real migration from F3/J3 to F4/J4. Up to now evertything is going smoothly. However I think we miss a class initialization.
I'm using the Custom class in /libraries/fabrik/fabrik/fabrik/Helpers/Custom.php to load static function reachable from where ever you are (eval, calc, default values, etc..).
There is a function called __initStatic used to initialize all static variables which can be used in the custom static functions.
For example, for a default value in an element I use :
return \Fabrik\Helpers\Custom::getParametre('default_session_size');
"getParametre" allows to retrieve my application parameters from a private array. This array is initialized inside the __initStatic func.
The problem is that it is never initialized. If I add the following line :
\Fabrik\Helpers\Custom::__initStatic();
somewhere in the form, everything works as in F3. But I think this should be called by Fabrik's model as part as helpers setup.
I don't know where it was initialized in F3. Any idea so I could add it as part of the F4 setup ?