34 lines
		
	
	
		
			918 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			918 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
|     namespace Notification\Users;
 | |
| 
 | |
|     use Notification;
 | |
|     require_once 'Notification.php';
 | |
| 
 | |
|     class PostMentionNotification extends \Notification
 | |
|     {
 | |
|         public function __construct(array $data)
 | |
|         {
 | |
|             $data['type'] = 'users.mentionedPost';
 | |
|             parent::__construct($data);
 | |
|         }
 | |
| 
 | |
|         public function getNotificationLink()
 | |
|         {
 | |
|             return '/user/' . $this->sender->getUsername() . '/post/' . $this->parameters;
 | |
|         }
 | |
| 
 | |
|         public function getNotificationImage()
 | |
|         {
 | |
|             return $this->sender->getProfilePicture();
 | |
|         }
 | |
| 
 | |
|         public function messageForNotification(Notification $notification)
 | |
|         {
 | |
|             return ['line' => 'users.mentionedPost.single', 'attributes' => [$this->sender->getName()]];
 | |
|         }
 | |
| 
 | |
|         public function messageForNotifications(array $notifications, $realCount = 0)
 | |
|         {
 | |
|         }
 | |
|     } |