Completed
Push — sonata-block-4 ( 430eec...7b4499 )
by Kamil
66:32 queued 45:06
created

TemplateBlock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 5
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sylius\Bundle\UiBundle\Registry;
15
16
final class TemplateBlock
17
{
18
    /** @var string */
19
    private $name;
20
21
    /** @var string */
22
    private $template;
23
24
    /** @var array */
25
    private $context;
26
27
    /** @var int */
28
    private $priority;
29
30
    /** @var bool */
31
    private $enabled;
32
33
    public function __construct(
34
        string $name,
35
        string $template,
36
        array $context,
37
        int $priority,
38
        bool $enabled
39
    ) {
40
        $this->name = $name;
41
        $this->template = $template;
42
        $this->context = $context;
43
        $this->priority = $priority;
44
        $this->enabled = $enabled;
45
    }
46
47
    public function getName(): string
48
    {
49
        return $this->name;
50
    }
51
52
    public function getTemplate(): string
53
    {
54
        return $this->template;
55
    }
56
57
    public function getContext(): array
58
    {
59
        return $this->context;
60
    }
61
62
    public function getPriority(): int
63
    {
64
        return $this->priority;
65
    }
66
67
    public function isEnabled(): bool
68
    {
69
        return $this->enabled;
70
    }
71
}
72