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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ndobromirov created an issue. See original summary.

ndobromirov’s picture

Version: 7.x-2.x-dev » 7.x-2.5
Status: Active » Needs review
FileSize
461 bytes

I've managed to implement option 2 with this.

Status: Needs review » Needs work

The last submitted patch, 2: message_notify-autoloader-fix-2784839-D7-2.patch, failed testing.

ndobromirov’s picture

Previous patch was broken due to manual cleaning, sorry.

ndobromirov’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: message_notify-autoloader-fix-2784839-D7-3.patch, failed testing.

bluegeek9’s picture

Status: Needs work » Closed (outdated)