mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Chill\MainBundle\Repository\NotificationRepository;
|
||||
use Chill\MainBundle\Notification\NotificationRenderer;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
|
||||
use Chill\MainBundle\Repository\NotificationRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/notification")
|
||||
@@ -22,13 +28,14 @@ class NotificationController extends AbstractController
|
||||
$this->security = $security;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Route("/show", name="chill_main_notification_show")
|
||||
*/
|
||||
public function showAction(
|
||||
NotificationRepository $notificationRepository, NotificationRenderer $notificationRenderer,
|
||||
PaginatorFactory $paginatorFactory)
|
||||
NotificationRepository $notificationRepository,
|
||||
NotificationRenderer $notificationRenderer,
|
||||
PaginatorFactory $paginatorFactory
|
||||
)
|
||||
{
|
||||
$currentUser = $this->security->getUser();
|
||||
|
||||
@@ -37,15 +44,17 @@ class NotificationController extends AbstractController
|
||||
|
||||
$notifications = $notificationRepository->findAllForAttendee(
|
||||
$currentUser,
|
||||
$limit=$paginator->getItemsPerPage(),
|
||||
$offset= $paginator->getCurrentPage()->getFirstItemNumber());
|
||||
$limit = $paginator->getItemsPerPage(),
|
||||
$offset = $paginator->getCurrentPage()->getFirstItemNumber()
|
||||
);
|
||||
|
||||
$templateData = [];
|
||||
|
||||
$templateData = array();
|
||||
foreach ($notifications as $notification) {
|
||||
$data = [
|
||||
'template' => $notificationRenderer->getTemplate($notification),
|
||||
'template_data' => $notificationRenderer->getTemplateData($notification),
|
||||
'notification' => $notification
|
||||
'notification' => $notification,
|
||||
];
|
||||
$templateData[] = $data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user