Total Complexity | 6 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | trait ChildRouteTrait |
||
8 | { |
||
9 | /** |
||
10 | * @ORM\ManyToOne(targetEntity="Silverback\ApiComponentBundle\Entity\Route\Route") |
||
11 | * @ORM\JoinColumn(nullable=true, referencedColumnName="id", onDelete="SET NULL") |
||
12 | * @var Route|null |
||
13 | */ |
||
14 | protected $parentRoute; |
||
15 | |||
16 | /** |
||
17 | * @ORM\Column(type="boolean", options={"default":"0"}) |
||
18 | * @var boolean |
||
19 | */ |
||
20 | protected $nested = false; |
||
21 | |||
22 | public function isNested(): bool |
||
23 | { |
||
24 | return $this->nested; |
||
25 | } |
||
26 | |||
27 | public function setNested(bool $nested) |
||
28 | { |
||
29 | $this->nested = $nested; |
||
30 | return $this; |
||
31 | } |
||
32 | |||
33 | public function setParentRoute(?Route $parentRoute) |
||
34 | { |
||
35 | $this->parentRoute = $parentRoute; |
||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | public function getParentRoute(): ?Route |
||
48 | } |
||
49 | } |
||
50 |