You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is: default: $function->addArgument();
So, if the argument is not Scalar_String, Scalar_LNumber or Scalar_DNumber then the argument is silently discarded. It would be very helpful if the class could at least call an empty protected method so that a child class can then decide what happens with that argument without completely overriding createFunction(). Drupal has the following syntax to supply context info: t("Translatable string","",["context"=>"Context string"]); Unfortunately the array type in the 3rd argument is discarded and there's no easy way to get to it even in a child class.
The text was updated successfully, but these errors were encountered:
Ok, fair enough.
I've added the ability to handle not only scalar values but also arrays. Could you test it to know if it can be adapted to Drupal before release a new version?
Yes, I just tested this. It works and it is incredibly helpful. A huge improvement in contrast to the 4.x version where I had to include a full-fledged PHP-array token parser. Hundered of crazy code lines => gone! Amazing. Would be very happy if you could include this change in the next release.
Currently there is:
default: $function->addArgument();
So, if the argument is not Scalar_String, Scalar_LNumber or Scalar_DNumber then the argument is silently discarded. It would be very helpful if the class could at least call an empty protected method so that a child class can then decide what happens with that argument without completely overriding createFunction(). Drupal has the following syntax to supply context info: t("Translatable string","",["context"=>"Context string"]); Unfortunately the array type in the 3rd argument is discarded and there's no easy way to get to it even in a child class.
The text was updated successfully, but these errors were encountered: