Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Core/Repository/SiteAccessAware/SectionService.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\SiteAccessAware;
8
9 use eZ\Publish\API\Repository\SectionService as SectionServiceInterface;
10 use eZ\Publish\API\Repository\Values\Content\Location;
11 use eZ\Publish\API\Repository\Values\Content\SectionCreateStruct;
12 use eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct;
13 use eZ\Publish\API\Repository\Values\Content\Section;
14 use eZ\Publish\API\Repository\Values\Content\ContentInfo;
15
21 class SectionService implements SectionServiceInterface
22 {
24 protected $service;
25
31 public function __construct(
32 SectionServiceInterface $service
33 ) {
34 $this->service = $service;
35 }
36
37 public function createSection(SectionCreateStruct $sectionCreateStruct)
38 {
39 return $this->service->createSection($sectionCreateStruct);
40 }
41
42 public function updateSection(Section $section, SectionUpdateStruct $sectionUpdateStruct)
43 {
44 return $this->service->updateSection($section, $sectionUpdateStruct);
45 }
46
47 public function loadSection($sectionId)
48 {
49 return $this->service->loadSection($sectionId);
50 }
51
52 public function loadSections()
53 {
54 return $this->service->loadSections();
55 }
56
57 public function loadSectionByIdentifier($sectionIdentifier)
58 {
59 return $this->service->loadSectionByIdentifier($sectionIdentifier);
60 }
61
62 public function countAssignedContents(Section $section)
63 {
64 return $this->service->countAssignedContents($section);
65 }
66
67 public function isSectionUsed(Section $section)
68 {
69 return $this->service->isSectionUsed($section);
70 }
71
72 public function assignSection(ContentInfo $contentInfo, Section $section)
73 {
74 return $this->service->assignSection($contentInfo, $section);
75 }
76
77 public function assignSectionToSubtree(Location $location, Section $section): void
78 {
79 $this->service->assignSectionToSubtree($location, $section);
80 }
81
82 public function deleteSection(Section $section)
83 {
84 return $this->service->deleteSection($section);
85 }
86
87 public function newSectionCreateStruct()
88 {
89 return $this->service->newSectionCreateStruct();
90 }
91
92 public function newSectionUpdateStruct()
93 {
94 return $this->service->newSectionUpdateStruct();
95 }
96 }
eZ\Publish\API\Repository\Values\Content\ContentInfo
Definition: API/Repository/Values/Content/ContentInfo.php:31
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\API\Repository\Values\Content\SectionCreateStruct
This class represents a section.
Definition: API/Repository/Values/Content/SectionCreateStruct.php:14
eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct
This class is used to provide data for updating a section.
Definition: API/Repository/Values/Content/SectionUpdateStruct.php:13
eZ\Publish\API\Repository\Values\Content\Section
Definition: API/Repository/Values/Content/Section.php:19
eZ\Publish\Core\Repository\SiteAccessAware\SectionService
SectionService for SiteAccessAware layer.
Definition: Core/Repository/SiteAccessAware/SectionService.php:22
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\newSectionUpdateStruct
newSectionUpdateStruct()
Instantiates a new SectionUpdateStruct.
Definition: Core/Repository/SiteAccessAware/SectionService.php:92
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\deleteSection
deleteSection(Section $section)
Deletes $section from content repository.
Definition: Core/Repository/SiteAccessAware/SectionService.php:82
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\__construct
__construct(SectionServiceInterface $service)
Construct service object from aggregated service.
Definition: Core/Repository/SiteAccessAware/SectionService.php:31
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\isSectionUsed
isSectionUsed(Section $section)
Returns true if the given section is assigned to contents, or used in role policies,...
Definition: Core/Repository/SiteAccessAware/SectionService.php:67
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\loadSection
loadSection($sectionId)
Loads a Section from its id ($sectionId).
Definition: Core/Repository/SiteAccessAware/SectionService.php:47
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\loadSectionByIdentifier
loadSectionByIdentifier($sectionIdentifier)
Loads a Section from its identifier ($sectionIdentifier).
Definition: Core/Repository/SiteAccessAware/SectionService.php:57
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\newSectionCreateStruct
newSectionCreateStruct()
Instantiates a new SectionCreateStruct.
Definition: Core/Repository/SiteAccessAware/SectionService.php:87
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\countAssignedContents
countAssignedContents(Section $section)
Counts the contents which $section is assigned to.
Definition: Core/Repository/SiteAccessAware/SectionService.php:62
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\assignSectionToSubtree
assignSectionToSubtree(Location $location, Section $section)
Assigns the subtree to the given section this method overrides the current assigned section.
Definition: Core/Repository/SiteAccessAware/SectionService.php:77
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\loadSections
loadSections()
Loads all sections, excluding the ones the current user is not allowed to read.
Definition: Core/Repository/SiteAccessAware/SectionService.php:52
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\updateSection
updateSection(Section $section, SectionUpdateStruct $sectionUpdateStruct)
Updates the given in the content repository.
Definition: Core/Repository/SiteAccessAware/SectionService.php:42
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\assignSection
assignSection(ContentInfo $contentInfo, Section $section)
Assigns the content to the given section this method overrides the current assigned section.
Definition: Core/Repository/SiteAccessAware/SectionService.php:72
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\$service
$service
Definition: Core/Repository/SiteAccessAware/SectionService.php:24
eZ\Publish\Core\Repository\SiteAccessAware\SectionService\createSection
createSection(SectionCreateStruct $sectionCreateStruct)
Creates the a new Section in the content repository.
Definition: Core/Repository/SiteAccessAware/SectionService.php:37
eZ\Publish\API\Repository\SectionService
Section service, used for section operations.
Definition: API/Repository/SectionService.php:19
eZ\Publish\Core\Repository\SiteAccessAware
Definition: Core/Repository/SiteAccessAware/ContentService.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.