1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* SectionService class. |
5
|
|
|
* |
6
|
|
|
* @copyright Copyright (C) eZ Systems AS. All rights reserved. |
7
|
|
|
* @license For full copyright and license information view LICENSE file distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
namespace eZ\Publish\Core\Repository\SiteAccessAware; |
10
|
|
|
|
11
|
|
|
use eZ\Publish\API\Repository\SectionService as SectionServiceInterface; |
12
|
|
|
use eZ\Publish\API\Repository\Values\Content\Location; |
13
|
|
|
use eZ\Publish\API\Repository\Values\Content\SectionCreateStruct; |
14
|
|
|
use eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct; |
15
|
|
|
use eZ\Publish\API\Repository\Values\Content\Section; |
16
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentInfo; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* SectionService for SiteAccessAware layer. |
20
|
|
|
* |
21
|
|
|
* Currently does nothing but hand over calls to aggregated service. |
22
|
|
|
*/ |
23
|
|
|
class SectionService implements SectionServiceInterface |
24
|
|
|
{ |
25
|
|
|
/** @var \eZ\Publish\API\Repository\SectionService */ |
26
|
|
|
protected $service; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Construct service object from aggregated service. |
30
|
|
|
* |
31
|
|
|
* @param \eZ\Publish\API\Repository\SectionService $service |
32
|
|
|
*/ |
33
|
|
|
public function __construct( |
34
|
|
|
SectionServiceInterface $service |
35
|
|
|
) { |
36
|
|
|
$this->service = $service; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function createSection(SectionCreateStruct $sectionCreateStruct) |
40
|
|
|
{ |
41
|
|
|
return $this->service->createSection($sectionCreateStruct); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function updateSection(Section $section, SectionUpdateStruct $sectionUpdateStruct) |
45
|
|
|
{ |
46
|
|
|
return $this->service->updateSection($section, $sectionUpdateStruct); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function loadSection($sectionId) |
50
|
|
|
{ |
51
|
|
|
return $this->service->loadSection($sectionId); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function loadSections() |
55
|
|
|
{ |
56
|
|
|
return $this->service->loadSections(); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function loadSectionByIdentifier($sectionIdentifier) |
60
|
|
|
{ |
61
|
|
|
return $this->service->loadSectionByIdentifier($sectionIdentifier); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function countAssignedContents(Section $section) |
65
|
|
|
{ |
66
|
|
|
return $this->service->countAssignedContents($section); |
|
|
|
|
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function isSectionUsed(Section $section) |
70
|
|
|
{ |
71
|
|
|
return $this->service->isSectionUsed($section); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function assignSection(ContentInfo $contentInfo, Section $section) |
75
|
|
|
{ |
76
|
|
|
return $this->service->assignSection($contentInfo, $section); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function assignSectionToSubtree(Location $location, Section $section): void |
80
|
|
|
{ |
81
|
|
|
$this->service->assignSectionToSubtree($location, $section); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function deleteSection(Section $section) |
85
|
|
|
{ |
86
|
|
|
return $this->service->deleteSection($section); |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
public function newSectionCreateStruct() |
90
|
|
|
{ |
91
|
|
|
return $this->service->newSectionCreateStruct(); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
public function newSectionUpdateStruct() |
95
|
|
|
{ |
96
|
|
|
return $this->service->newSectionUpdateStruct(); |
97
|
|
|
} |
98
|
|
|
} |
99
|
|
|
|
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.