| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait RouteAwareTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @ORM\OneToMany(targetEntity="Silverback\ApiComponentBundle\Entity\Navigation\Route\Route", mappedBy="content") |
||
| 13 | * @Groups({"layout", "content", "component"}) |
||
| 14 | * @var ArrayCollection|Route[] |
||
| 15 | */ |
||
| 16 | protected $routes; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param Route $route |
||
| 20 | * @return RouteAwareInterface |
||
| 21 | */ |
||
| 22 | public function addRoute(Route $route): RouteAwareInterface |
||
| 23 | { |
||
| 24 | $this->routes->add($route); |
||
| 25 | return $this; |
||
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param Route $route |
||
| 30 | * @return RouteAwareInterface |
||
| 31 | */ |
||
| 32 | public function removeRoute(Route $route): RouteAwareInterface |
||
| 36 | } |
||
| 37 | } |
||
| 38 |