Total Complexity | 8 |
Total Lines | 94 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | class Page extends AbstractContent |
||
19 | { |
||
20 | /** |
||
21 | * @ORM\Column() |
||
22 | * @Groups({"content"}) |
||
23 | * @var string |
||
24 | */ |
||
25 | private $title; |
||
26 | |||
27 | /** |
||
28 | * @ORM\Column() |
||
29 | * @Groups({"content"}) |
||
30 | * @var string |
||
31 | */ |
||
32 | private $metaDescription; |
||
33 | |||
34 | /** |
||
35 | * @ORM\ManyToOne(targetEntity="Page") |
||
36 | * @ORM\JoinColumn(nullable=true) |
||
37 | * @var null|Page |
||
38 | */ |
||
39 | private $parent; |
||
40 | |||
41 | /** |
||
42 | * @ORM\ManyToOne(targetEntity="Silverback\ApiComponentBundle\Entity\Layout\Layout") |
||
43 | * @ORM\JoinColumn(onDelete="SET NULL") |
||
44 | * @ApiProperty() |
||
45 | * @Groups({"content"}) |
||
46 | * @var Layout|null |
||
47 | */ |
||
48 | private $layout; |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function getTitle(): string |
|
54 | { |
||
55 | 1 | return $this->title; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @param string $title |
||
60 | */ |
||
61 | 1 | public function setTitle(string $title): void |
|
64 | 1 | } |
|
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | 1 | public function getMetaDescription(): string |
|
70 | { |
||
71 | 1 | return $this->metaDescription; |
|
72 | } |
||
73 | |||
74 | /** |
||
75 | * @param string $metaDescription |
||
76 | */ |
||
77 | 1 | public function setMetaDescription(string $metaDescription): void |
|
78 | { |
||
79 | 1 | $this->metaDescription = $metaDescription; |
|
80 | 1 | } |
|
81 | |||
82 | /** |
||
83 | * @return null|Page |
||
84 | */ |
||
85 | 1 | public function getParent(): ?Page |
|
86 | { |
||
87 | 1 | return $this->parent; |
|
88 | } |
||
89 | |||
90 | /** |
||
91 | * @param null|Page $parent |
||
92 | */ |
||
93 | 1 | public function setParent(?Page $parent): void |
|
94 | { |
||
95 | 1 | $this->parent = $parent; |
|
96 | 1 | } |
|
97 | |||
98 | /** |
||
99 | * @return Layout|null |
||
100 | */ |
||
101 | 1 | public function getLayout(): ?Layout |
|
104 | } |
||
105 | |||
106 | /** |
||
107 | * @param Layout|null $layout |
||
108 | */ |
||
109 | 1 | public function setLayout(?Layout $layout): void |
|
112 | 1 | } |
|
113 | } |
||
114 |