-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-20251 Make it easier to overwrite front end form help text regard… #9970
CRM-20251 Make it easier to overwrite front end form help text regard… #9970
Conversation
test this please |
unrelated fail |
test this please |
Very nice! |
@adixon is that approval to merge? |
Hmm, well, if you put it like that ... how about putting the getRecurringHelpText static function on the contribution object where a payment processor could override it? |
I don't have a problem with that, but perhaps it should be more like 'getHelpText('recurring, array()); so it can support multiple, I don't really like passing around 'random' arrays, but I suppose the keys for each piece of text could be documented in the docblock. |
I think you're proposing a general getHelpText method for the payment processor object, that can be re-used/expanded so that all help text can be customized per payment processor? That sounds excellent. If the method is NOT static, then it wouldn't need the recurring parameter, right? Or are there times where you want help text without a specific contribution? Hmm, I guess that starts getting a bit too icky, I'd go with the single associative array argument with defined keys that can be expanded over time. |
8d97fde
to
7f9fa45
Compare
@adixon what do you think of it now? I admit my distrust of people adding weird & wonderful undocumented things has come through in the way I implemented it ..... Note this can be overridden by the payment processor, but it can also be overridden in a std hook in any extension by assigning a value to the template. |
You might regret asking, but I went ahead and have a slightly different version of your getText function version here: |
Dang I tried to switch to yours but it has style errors |
7f9fa45
to
6841f76
Compare
@adixon ok, your changes are incorporated in here now, and I agree they are improvements, despite my general hatred for 'switch' I agree it is right here |
CRM-20251 Make it easier to overwrite front end form help text regard…
…ing recurring