AlertController::getAlertPublisher()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * AlertController.php
4
 * Definition of class AlertController
5
 *
6
 * Created 28/08/14 23:55
7
 *
8
 * @author Rasanga Perera <[email protected]>
9
 * Copyright (c) 2014, The MIT License (MIT)
10
 */
11
12
namespace Ras\Bundle\FlashAlertBundle\Controller;
13
14
15
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
16
17
class AlertController extends Controller
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Bundle\Framework...e\Controller\Controller has been deprecated with message: since Symfony 4.2, use "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
18
{
19
    /**
20
     * @deprecated
21
     *
22
     * @param bool $isAddStyles
23
     * @param bool $isAddJsAlertClose
24
     * @return \Symfony\Component\HttpFoundation\Response
25
     */
26
    public function displayAlertsAction($isAddStyles = true, $isAddJsAlertClose = true)
27
    {
28
        return $this->render(
29
            'RasFlashAlertBundle::layout.html.twig',
30
            array(
31
                'alertPublisher'        =>  $this->getAlertPublisher(),
32
                'isAddStyles'           =>  $isAddStyles,
33
                'isAddJsAlertClose'     =>  $isAddJsAlertClose
34
            )
35
        );
36
    }
37
38
    /**
39
     * @return \Ras\Bundle\FlashAlertBundle\Model\AlertPublisher
40
     *
41
     */
42
    private function getAlertPublisher()
43
    {
44
        return $this->get('ras_flash_alert.alert_publisher');
45
    }
46
}