chill-bundles/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationRenderer.php
2021-06-18 18:05:02 +02:00

25 lines
576 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)
{
return $notification->getRelatedEntityClass() == Activity::class;
}
public function getTemplate()
{
return 'ChillActivityBundle:Activity:showInNotification.html.twig';
}
public function getTemplateData(Notification $notification)
{
return ['notification' => $notification];
}
}