How to change access implementation of a notification plugin?

Created on 16 August 2016, almost 8 years ago
Updated 15 January 2024, 5 months ago

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 request
Status

Closed: outdated

Version

2.5

Component

Documentation

Created by

πŸ‡§πŸ‡¬Bulgaria ndobromirov

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024