mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Display notification using services (draft)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user