1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace CultuurNet\UDB3\Offer; |
4
|
|
|
|
5
|
|
|
use CultuurNet\UDB3\BookingInfo; |
6
|
|
|
use CultuurNet\UDB3\ContactPoint; |
7
|
|
|
use CultuurNet\UDB3\Description; |
8
|
|
|
use CultuurNet\UDB3\Label; |
9
|
|
|
use CultuurNet\UDB3\Language; |
10
|
|
|
use CultuurNet\UDB3\Media\Image; |
11
|
|
|
use CultuurNet\UDB3\PriceInfo\PriceInfo; |
12
|
|
|
use ValueObjects\StringLiteral\StringLiteral; |
13
|
|
|
|
14
|
|
|
trait OfferEditingServiceDecoratorTrait |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @return OfferEditingServiceInterface |
18
|
|
|
*/ |
19
|
|
|
abstract protected function getDecoratedEditingService(); |
20
|
|
|
|
21
|
|
|
public function addLabel($id, Label $label) |
22
|
|
|
{ |
23
|
|
|
return $this->getDecoratedEditingService() |
24
|
|
|
->addLabel($id, $label); |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public function removeLabel($id, Label $label) |
28
|
|
|
{ |
29
|
|
|
return $this->getDecoratedEditingService() |
30
|
|
|
->removeLabel($id, $label); |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
public function translateTitle($id, Language $language, StringLiteral $title) |
34
|
|
|
{ |
35
|
|
|
return $this->getDecoratedEditingService() |
36
|
|
|
->translateTitle($id, $language, $title); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function addImage($id, Image $image) |
40
|
|
|
{ |
41
|
|
|
return $this->getDecoratedEditingService() |
42
|
|
|
->addImage($id, $image); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function updateImage($id, Image $image, StringLiteral $description, StringLiteral $copyrightHolder) |
46
|
|
|
{ |
47
|
|
|
return $this->getDecoratedEditingService() |
48
|
|
|
->updateImage($id, $image, $description, $copyrightHolder); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function removeImage($id, Image $image) |
52
|
|
|
{ |
53
|
|
|
return $this->getDecoratedEditingService() |
54
|
|
|
->removeImage($id, $image); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function selectMainImage($id, Image $image) |
58
|
|
|
{ |
59
|
|
|
return $this->getDecoratedEditingService() |
60
|
|
|
->selectMainImage($id, $image); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function updateDescription($id, Language $language, Description $description) |
64
|
|
|
{ |
65
|
|
|
return $this->getDecoratedEditingService() |
66
|
|
|
->updateDescription($id, $language, $description); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function updateTypicalAgeRange($id, $ageRange) |
70
|
|
|
{ |
71
|
|
|
return $this->getDecoratedEditingService() |
72
|
|
|
->updateTypicalAgeRange($id, $ageRange); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function deleteTypicalAgeRange($id) |
76
|
|
|
{ |
77
|
|
|
return $this->getDecoratedEditingService() |
78
|
|
|
->deleteTypicalAgeRange($id); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
public function updateOrganizer($id, $organizerId) |
82
|
|
|
{ |
83
|
|
|
return $this->getDecoratedEditingService() |
84
|
|
|
->updateOrganizer($id, $organizerId); |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
public function deleteOrganizer($id, $organizerId) |
88
|
|
|
{ |
89
|
|
|
return $this->getDecoratedEditingService() |
90
|
|
|
->deleteOrganizer($id, $organizerId); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
public function updateContactPoint($id, ContactPoint $contactPoint) |
94
|
|
|
{ |
95
|
|
|
return $this->getDecoratedEditingService() |
96
|
|
|
->updateContactPoint($id, $contactPoint); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public function updateBookingInfo($id, BookingInfo $bookingInfo) |
100
|
|
|
{ |
101
|
|
|
return $this->getDecoratedEditingService() |
102
|
|
|
->updateBookingInfo($id, $bookingInfo); |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
public function updatePriceInfo($id, PriceInfo $priceInfo) |
106
|
|
|
{ |
107
|
|
|
return $this->getDecoratedEditingService() |
108
|
|
|
->updatePriceInfo($id, $priceInfo); |
109
|
|
|
} |
110
|
|
|
} |
111
|
|
|
|