PHP code example of oveleon / contao-member-notification

1. Go to this page and download the library: Download oveleon/contao-member-notification library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oveleon / contao-member-notification example snippets


use Oveleon\ContaoMemberNotification\MemberNotificationModel;

MemberNotificationModel::add(int $memberId, string $title, string $teaser, string $jumpTo);

 if($this->hasNotifications): 

// Hook: beforeParseMemberNotification (Can be used to manipulate the data query)
public function onBeforeParseMemberNotification(int $read, ModuleMemberNotification $module): ?MemberNotificationModel
{
    // Custom logic
}

// Hook: parseMemberNotification (Can be used to change the template output)
public function onParseMemberNotification(MemberNotificationModel $objNotifications, ModuleMemberNotification $module): void
{
    // Custom logic
}