Completed
Push — development ( 8ef386...754cf1 )
by Thomas
19s
created

KitchenSinkDataProvider::getTemplateVars()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 9.4285
1
<?php
2
3
namespace OcDev\KitchenSink\DataProvider;
4
5
use BestIt\KitchensinkBundle\DataProviderInterface;
6
use Symfony\Component\HttpFoundation\Session\Session;
7
8
/**
9
 * Class KitchenSinkDataProvider
10
 *
11
 * @package OcDev\KitchenSink\DataProvider
12
 */
13
class KitchenSinkDataProvider implements DataProviderInterface
14
{
15
    /**
16
     * @var Session
17
     */
18
    private $session;
19
20
    /**
21
     * KitchenSinkDataProvider constructor.
22
     *
23
     * @param Session $session
24
     */
25
    public function __construct(Session $session)
26
    {
27
        $this->session = $session;
28
    }
29
30
    /**
31
     * Returns an array with template vars (and optional their getters) to fill the kitchensink template.
32
     *
33
     * @return array
34
     */
35
    public function getTemplateVars()
36
    {
37
        $this->session->getFlashBag()->add('success', 'Erfolgreiche Meldung 1!');
38
        $this->session->getFlashBag()->add('success', 'Erfolgreiche Meldung 2!');
39
        $this->session->getFlashBag()->add('info', 'Informative Meldung!');
40
        $this->session->getFlashBag()->add('error', 'Fehlerhafte Meldung!');
41
42
        return [
43
            'navigation' => 'getNavigationDummies'
44
        ];
45
    }
46
47
    /**
48
     * @return string[]
49
     */
50
    public function getNavigationDummies()
51
    {
52
        return [
53
            'Home',
54
            'Home1',
55
            'Home2',
56
            'Home3',
57
        ];
58
    }
59
}
60