mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
25 lines
598 B
PHP
25 lines
598 B
PHP
<?php
|
|
|
|
namespace Chill\ActivityBundle\Notification;
|
|
|
|
use Chill\MainBundle\Entity\Notification;
|
|
use Chill\ActivityBundle\Entity\Activity;
|
|
|
|
final class ActivityNotificationRenderer
|
|
{
|
|
public function supports(Notification $notification, array $options = []): bool
|
|
{
|
|
return $notification->getRelatedEntityClass() == Activity::class;
|
|
}
|
|
|
|
public function getTemplate()
|
|
{
|
|
return '@ChillActivity/Activity/showInNotification.html.twig';
|
|
}
|
|
|
|
public function getTemplateData(Notification $notification)
|
|
{
|
|
return ['notification' => $notification];
|
|
}
|
|
}
|