|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace eZ\Publish\Core\Event; |
|
6
|
|
|
|
|
7
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
8
|
|
|
use eZ\Publish\API\Repository\LocationService as LocationServiceInterface; |
|
9
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentInfo; |
|
10
|
|
|
use eZ\Publish\API\Repository\Values\Content\Location; |
|
11
|
|
|
use eZ\Publish\API\Repository\Values\Content\LocationCreateStruct; |
|
12
|
|
|
use eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct; |
|
13
|
|
|
use eZ\Publish\API\Repository\Values\Content\VersionInfo; |
|
14
|
|
|
|
|
15
|
|
|
class LocationService implements LocationServiceInterface |
|
16
|
|
|
{ |
|
17
|
|
|
/** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */ |
|
18
|
|
|
protected $eventDispatcher; |
|
19
|
|
|
|
|
20
|
|
|
public function __construct(LocationServiceInterface $innerService, EventDispatcherInterface $eventDispatcher) |
|
|
|
|
|
|
21
|
|
|
{ |
|
22
|
|
|
parent::__construct($innerRepository); |
|
|
|
|
|
|
23
|
|
|
|
|
24
|
|
|
$this->eventDispatcher = $eventDispatcher; |
|
|
|
|
|
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
public function copySubtree(Location $subtree, Location $targetParentLocation) |
|
28
|
|
|
{ |
|
29
|
|
|
parent::copySubtree($subtree, $targetParentLocation); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function loadLocation($locationId, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null) |
|
33
|
|
|
{ |
|
34
|
|
|
parent::loadLocation($locationId, $prioritizedLanguages, $useAlwaysAvailable); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
public function loadLocationList(array $locationIds, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null): iterable |
|
38
|
|
|
{ |
|
39
|
|
|
return parent::loadLocationList($locationIds, $prioritizedLanguages, $useAlwaysAvailable); |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
public function loadLocationByRemoteId($remoteId, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null) |
|
43
|
|
|
{ |
|
44
|
|
|
parent::loadLocationByRemoteId($remoteId, $prioritizedLanguages, $useAlwaysAvailable); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
public function loadLocations(ContentInfo $contentInfo, Location $rootLocation = null, array $prioritizedLanguages = null) |
|
48
|
|
|
{ |
|
49
|
|
|
parent::loadLocations($contentInfo, $rootLocation, $prioritizedLanguages); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
public function loadLocationChildren(Location $location, $offset = 0, $limit = 25, array $prioritizedLanguages = null) |
|
53
|
|
|
{ |
|
54
|
|
|
parent::loadLocationChildren($location, $offset, $limit, $prioritizedLanguages); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
public function loadParentLocationsForDraftContent(VersionInfo $versionInfo, array $prioritizedLanguages = null) |
|
58
|
|
|
{ |
|
59
|
|
|
parent::loadParentLocationsForDraftContent($versionInfo, $prioritizedLanguages); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
public function getLocationChildCount(Location $location) |
|
63
|
|
|
{ |
|
64
|
|
|
parent::getLocationChildCount($location); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
public function createLocation(ContentInfo $contentInfo, LocationCreateStruct $locationCreateStruct) |
|
68
|
|
|
{ |
|
69
|
|
|
parent::createLocation($contentInfo, $locationCreateStruct); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
public function updateLocation(Location $location, LocationUpdateStruct $locationUpdateStruct) |
|
73
|
|
|
{ |
|
74
|
|
|
parent::updateLocation($location, $locationUpdateStruct); |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function swapLocation(Location $location1, Location $location2) |
|
78
|
|
|
{ |
|
79
|
|
|
parent::swapLocation($location1, $location2); |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function hideLocation(Location $location) |
|
83
|
|
|
{ |
|
84
|
|
|
parent::hideLocation($location); |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
public function unhideLocation(Location $location) |
|
88
|
|
|
{ |
|
89
|
|
|
parent::unhideLocation($location); |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
public function moveSubtree(Location $location, Location $newParentLocation) |
|
93
|
|
|
{ |
|
94
|
|
|
parent::moveSubtree($location, $newParentLocation); |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
public function deleteLocation(Location $location) |
|
98
|
|
|
{ |
|
99
|
|
|
parent::deleteLocation($location); |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
public function newLocationCreateStruct($parentLocationId) |
|
103
|
|
|
{ |
|
104
|
|
|
parent::newLocationCreateStruct($parentLocationId); |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
public function newLocationUpdateStruct() |
|
108
|
|
|
{ |
|
109
|
|
|
parent::newLocationUpdateStruct(); |
|
110
|
|
|
} |
|
111
|
|
|
|
|
112
|
|
|
public function getAllLocationsCount(): int |
|
113
|
|
|
{ |
|
114
|
|
|
return parent::getAllLocationsCount(); |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
public function loadAllLocations(int $offset = 0, int $limit = 25): array |
|
118
|
|
|
{ |
|
119
|
|
|
return parent::loadAllLocations($offset, $limit); |
|
120
|
|
|
} |
|
121
|
|
|
} |
|
122
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.