| Total Complexity | 7 | 
| Total Lines | 52 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | class PageHasMedia implements PageHasMediaInterface | ||
| 12 | { | ||
| 13 | use IdTrait; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * @ORM\ManyToOne(targetEntity="PiedWeb\CMSBundle\Entity\MediaInterface", inversedBy="pageHasMedias") | ||
| 17 | */ | ||
| 18 | protected $media; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * @ORM\ManyToOne(targetEntity="PiedWeb\CMSBundle\Entity\PageInterface", inversedBy="pageHasMedias") | ||
| 22 | */ | ||
| 23 | protected $page; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * @ORM\Column(type="integer") | ||
| 27 | */ | ||
| 28 | protected $position = 0; | ||
| 29 | |||
| 30 | public function __toString() | ||
| 31 |     { | ||
| 32 | return $this->getPage().' | '.$this->getMedia(); | ||
| 33 | } | ||
| 34 | |||
| 35 | public function setPage(?PageInterface $page = null) | ||
| 36 |     { | ||
| 37 | $this->page = $page; | ||
| 38 | } | ||
| 39 | |||
| 40 | public function getPage() | ||
| 41 |     { | ||
| 42 | return $this->page; | ||
| 43 | } | ||
| 44 | |||
| 45 | public function setMedia(?MediaInterface $media = null) | ||
| 46 |     { | ||
| 47 | $this->media = $media; | ||
| 48 | } | ||
| 49 | |||
| 50 | public function getMedia() | ||
| 51 |     { | ||
| 52 | return $this->media; | ||
| 53 | } | ||
| 54 | |||
| 55 | public function setPosition($position) | ||
| 56 |     { | ||
| 57 | $this->position = $position; | ||
| 58 | } | ||
| 59 | |||
| 60 | public function getPosition() | ||
| 63 | } | ||
| 64 | } | ||
| 65 |