Problem/Motivation
You have users that can chouse to be notified through email and/or SMS.
How can someone implement this feature with messages.
After code review of the module, this shold happen through the access() method of the message notifier class.
I see 2 options now:
Option 1: Either implement new plugins, using the existing ones as a starting point causing: code repetition, degrade maintainability and UI clutter.
Option 2: Hack the plugin and change the class through ctools plugin alter (something) hook, then subclass the original and profit. I have issues with this, as aparently the original classes are not loaded, triggering fatal errors in PHP.
Proposed resolution
Add the classes for SMS and Email to files[] in the info file, so drupal's auto-loader will handle the auto-loading case correctly.
Confirm to one of the proposals or suggest a better one.
Remaining tasks
Discussion, patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#4 | message_notify-autoloader-fix-2784839-D7-3.patch | 455 bytes | ndobromirov |
Comments
Comment #2
ndobromirov CreditAttribution: ndobromirov at FFW commentedI've managed to implement option 2 with this.
Comment #4
ndobromirov CreditAttribution: ndobromirov at FFW commentedPrevious patch was broken due to manual cleaning, sorry.
Comment #5
ndobromirov CreditAttribution: ndobromirov at FFW commentedComment #7
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented