| Total Complexity | 7 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | abstract class AbstractPage extends AbstractContent implements PageInterface |
||
| 16 | { |
||
| 17 | use PageTrait; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @ORM\ManyToOne(targetEntity="Silverback\ApiComponentBundle\Entity\Content\Page\AbstractPage") |
||
| 21 | * @ORM\JoinColumn(nullable=true, onDelete="SET NULL") |
||
| 22 | * @Groups({"route"}) |
||
| 23 | * @var null|StaticPage |
||
| 24 | */ |
||
| 25 | protected $parent; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @ORM\Column(type="boolean") |
||
| 29 | * @Groups({"content", "route", "component"}) |
||
| 30 | * @var boolean |
||
| 31 | */ |
||
| 32 | protected $dynamic = false; |
||
| 33 | |||
| 34 | public function getParent(): ?StaticPage |
||
| 35 | { |
||
| 36 | return $this->parent; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function setParent(?StaticPage $parent): self |
||
| 43 | } |
||
| 44 | |||
| 45 | public function isDynamic(): bool |
||
| 46 | { |
||
| 47 | return $this->dynamic; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getDefaultRoute(): string |
||
| 51 | { |
||
| 52 | return $this->getTitle(); |
||
| 53 | } |
||
| 54 | |||
| 55 | public function getDefaultRouteName(): string |
||
| 58 | } |
||
| 59 | 1 | ||
| 60 | 1 | public function getParentRoute(): ?Route |
|
| 63 | } |
||
| 64 | } |
||
| 65 |