<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Notification_UserRelation_SenderAcceptedFollowRequest extends vB_Notification_UserRelation { protected static $triggers = array( 'user-accepted-request-follow' => 10, ); const TYPENAME = 'SenderAcceptedFollowRequest'; protected function addAdditionalRecipients() { return array(); } protected function typeEnabledForUser($user) { static $bf_masks; if (empty($bf_masks)) { $bf_masks = vB::getDatastore()->getValue('bf_misc_usernotificationoptions'); } return ((bool) ($user['notification_options'] & $bf_masks['general_followrequest'])); } public static function fetchPhraseArray($notificationData) { $userid = $notificationData['sender']; $username = $notificationData['sender_username']; $userInfo = ['userid' => $userid, 'username' => $username]; try { $userProfileUrl = vB5_Route::buildUrl('profile|fullurl', $userInfo); } catch (Exception $e) { $userProfileUrl = "#"; } $userid = $notificationData['sender']; $phraseTitle = "x_accepted_follow_request"; $phraseData = [ $userProfileUrl, $userid, $notificationData['sender_musername'], ]; return [$phraseTitle, $phraseData]; } } 