Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | class MediaGroupDataTransferObject |
||
8 | { |
||
9 | /** @var MediaGroup */ |
||
10 | private $mediaGroupEntity; |
||
11 | |||
12 | /** |
||
13 | * You can give an id |
||
14 | * |
||
15 | * @var Uuid|null |
||
16 | */ |
||
17 | public $id; |
||
18 | |||
19 | /** @var Type */ |
||
20 | public $type; |
||
21 | |||
22 | /** @var array */ |
||
23 | public $mediaItemIdsToConnect; |
||
24 | |||
25 | /** @var bool */ |
||
26 | public $removeAllPreviousConnectedMediaItems = true; |
||
27 | |||
28 | public function __construct(MediaGroup $mediaGroup = null) |
||
29 | { |
||
30 | $this->mediaGroupEntity = $mediaGroup; |
||
31 | |||
32 | if ($this->hasExistingMediaGroup()) { |
||
33 | $this->id = $this->mediaGroupEntity->getId(); |
||
34 | $this->type = $this->mediaGroupEntity->getType(); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | public function getMediaGroupEntity(): MediaGroup |
||
41 | } |
||
42 | |||
43 | public function hasExistingMediaGroup(): bool |
||
46 | } |
||
47 | } |
||
48 |