Total Complexity | 6 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 0 |
1 | <?php |
||
17 | class Layout |
||
18 | { |
||
19 | /** |
||
20 | * @ORM\Id() |
||
21 | * @ORM\Column(type="string") |
||
22 | * @var string |
||
23 | */ |
||
24 | private $id; |
||
25 | |||
26 | /** |
||
27 | * @ORM\Column(type="boolean", name="is_default") |
||
28 | * @Groups({"layout"}) |
||
29 | * @var bool |
||
30 | */ |
||
31 | private $default = false; |
||
32 | |||
33 | /** |
||
34 | * @ORM\ManyToOne(targetEntity="Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\NavBar\NavBar") |
||
35 | * @ORM\JoinColumn(onDelete="SET NULL") |
||
36 | * @Groups({"layout", "default"}) |
||
37 | * @var null|NavBar |
||
38 | */ |
||
39 | private $navBar; |
||
40 | |||
41 | 4 | public function __construct() |
|
42 | { |
||
43 | 4 | $this->id = Uuid::uuid4()->getHex(); |
|
44 | 4 | } |
|
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getId(): string |
||
50 | { |
||
51 | return $this->id; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return bool |
||
56 | */ |
||
57 | 1 | public function isDefault(): bool |
|
58 | { |
||
59 | 1 | return $this->default; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param bool $default |
||
64 | */ |
||
65 | 2 | public function setDefault(bool $default): void |
|
68 | 2 | } |
|
69 | |||
70 | /** |
||
71 | * @return null|NavBar |
||
72 | */ |
||
73 | 1 | public function getNavBar(): ?NavBar |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param null|NavBar $navBar |
||
80 | */ |
||
81 | 1 | public function setNavBar(?NavBar $navBar): void |
|
86 |