richardhj/contao-notification_center_member_selectable

Member selectable messages for the notification_center extension for Contao Open Source CMS

v1.1.1 2021-04-08 19:18 UTC

This package is auto-updated.

Last update: 2024-09-09 02:47:20 UTC


README

Latest Version on Packagist Dependency Status

Member selectable messages for the notification_center extension for Contao Open Source CMS

Imagine, you provide nc messages (e.g. an order confirmation) with different gateways (like email or sms). This extension provides a front end module which lets the logged in member choose, which messages (e.g. only the sms message and/or only the email message) he wants to receive.

Usage

Modify the messages of a particular notifiaction and tick the box "Is member selectable" (All messages without this box ticked will be sent anyway). Create a new front end module "Manage messages" (can be found in the category "user"). Select the notifications, the member can manage with this module. Place the module in the front end (e.g. in the member area).

Demonstration front end module

Front end module

Interface: MessageDraftCheckSendInterface

The Interface MessageDraftCheckSendInterface can be added to any notification_center gateway and provides the function public function canSendDraft(Message $objMessage). This function will be called on saving the front end module (see below) and checks whether this message could be sent to this member.

For exemplary integration see richardhj/contao-notification_center_clockworsms. If you provide a notification_center gateway you can integrate the interface richardhj/contao-notification_center_checksendinterface.