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

Public Member Functions | Private Attributes | List of all members
eZ\Publish\Core\REST\Client\SectionService Class Reference

Implementation of the \eZ\Publish\API\Repository\SectionService interface. More...

Inheritance diagram for eZ\Publish\Core\REST\Client\SectionService:

## Public Member Functions
| __construct (HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, RequestParser $requestParser)
| setSession ($id)
| Set session ID. More...
| createSection (SectionCreateStruct $sectionCreateStruct)
| Creates the a new Section in the content repository. More...
| updateSection (Section $section, SectionUpdateStruct $sectionUpdateStruct)
| Updates the given in the content repository. More...
| loadSection ($sectionId)
| Loads a Section from its id ($sectionId). More...
| loadSections ()
| Loads all sections, excluding the ones the current user is not allowed to read. More...
| loadSectionByIdentifier ($sectionIdentifier)
| Loads a Section from its identifier ($sectionIdentifier). More...
| countAssignedContents (Section $section)
| Counts the contents which $section is assigned to. More...
| isSectionUsed (Section $section)
| Returns true if the given section is assigned to contents, or used in role policies, or in role assignments. More...
| assignSection (ContentInfo $contentInfo, Section $section)
| Assigns the content to the given section this method overrides the current assigned section. More...
| deleteSection (Section $section)
| Deletes $section from content repository. More...
| newSectionCreateStruct ()
| Instantiates a new SectionCreateStruct. More...
| newSectionUpdateStruct ()
| Instantiates a new SectionUpdateStruct. More...
Public Member Functions inherited from eZ\Publish\API\Repository\SectionService
| assignSectionToSubtree (Location $location, Section $section)
| Assigns the subtree to the given section this method overrides the current assigned section. More...

## Private Attributes
| $client
| $inputDispatcher
| $outputVisitor
| $requestParser

## Detailed Description

Implementation of the \eZ\Publish\API\Repository\SectionService interface.

See also
  \eZ\Publish\API\Repository\SectionService

Definition at line 28 of file Core/REST/Client/SectionService.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\REST\Client\SectionService::__construct | ( | HttpClient | $client,
|  | Dispatcher | $inputDispatcher,
|  | Visitor | $outputVisitor,
|  | RequestParser | $requestParser
| ) |  |

Parameters

  \eZ\Publish\Core\REST\Client\HttpClient | $client |
  \eZ\Publish\Core\REST\Common\Input\Dispatcher | $inputDispatcher |
  \eZ\Publish\Core\REST\Common\Output\Visitor | $outputVisitor |
  \eZ\Publish\Core\REST\Common\RequestParser | $requestParser |

Definition at line 48 of file Core/REST/Client/SectionService.php.

References eZ\Publish\Core\REST\Client\SectionService\$client, eZ\Publish\Core\REST\Client\SectionService\$inputDispatcher, eZ\Publish\Core\REST\Client\SectionService\$outputVisitor, and eZ\Publish\Core\REST\Client\SectionService\$requestParser.

## Member Function Documentation

## ◆ assignSection()

eZ\Publish\Core\REST\Client\SectionService::assignSection | ( | ContentInfo | $contentInfo,
|  | Section | $section
| ) |  |

Assigns the content to the given section this method overrides the current assigned section.

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 240 of file Core/REST/Client/SectionService.php.

## ◆ countAssignedContents()

eZ\Publish\Core\REST\Client\SectionService::countAssignedContents | ( | Section | $section | ) |

Counts the contents which $section is assigned to.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Section | $section |

Returns
  int

Deprecated:
  since 6.0

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 206 of file Core/REST/Client/SectionService.php.

## ◆ createSection()

eZ\Publish\Core\REST\Client\SectionService::createSection | ( | SectionCreateStruct | $sectionCreateStruct | ) |

Creates the a new Section in the content repository.

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 82 of file Core/REST/Client/SectionService.php.

## ◆ deleteSection()

eZ\Publish\Core\REST\Client\SectionService::deleteSection | ( | Section | $section | ) |

Deletes $section from content repository.

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 272 of file Core/REST/Client/SectionService.php.

## ◆ isSectionUsed()

eZ\Publish\Core\REST\Client\SectionService::isSectionUsed | ( | Section | $section | ) |

Returns true if the given section is assigned to contents, or used in role policies, or in role assignments.

This does not check user permissions.

Since
  6.0

Parameters

  \eZ\Publish\API\Repository\Values\Content\Section | $section |

Returns
  bool

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 222 of file Core/REST/Client/SectionService.php.

## ◆ loadSection()

eZ\Publish\Core\REST\Client\SectionService::loadSection | ( |  | $sectionId | ) |

Loads a Section from its id ($sectionId).

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 142 of file Core/REST/Client/SectionService.php.

## ◆ loadSectionByIdentifier()

eZ\Publish\Core\REST\Client\SectionService::loadSectionByIdentifier | ( |  | $sectionIdentifier | ) |

Loads a Section from its identifier ($sectionIdentifier).

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 183 of file Core/REST/Client/SectionService.php.

## ◆ loadSections()

eZ\Publish\Core\REST\Client\SectionService::loadSections | ( |  | ) |

Loads all sections, excluding the ones the current user is not allowed to read.

Returns
  array of \eZ\Publish\API\Repository\Values\Content\Section

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 160 of file Core/REST/Client/SectionService.php.

## ◆ newSectionCreateStruct()

eZ\Publish\Core\REST\Client\SectionService::newSectionCreateStruct | ( |  | ) |

Instantiates a new SectionCreateStruct.

Returns
  \eZ\Publish\API\Repository\Values\Content\SectionCreateStruct

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 296 of file Core/REST/Client/SectionService.php.

## ◆ newSectionUpdateStruct()

eZ\Publish\Core\REST\Client\SectionService::newSectionUpdateStruct | ( |  | ) |

Instantiates a new SectionUpdateStruct.

Returns
  \eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 306 of file Core/REST/Client/SectionService.php.

## ◆ setSession()

eZ\Publish\Core\REST\Client\SectionService::setSession | ( |  | $id | ) |

Set session ID.

Only for testing

Parameters

  mixed | $id |

Implements eZ\Publish\Core\REST\Client\Sessionable.

Definition at line 65 of file Core/REST/Client/SectionService.php.

## ◆ updateSection()

eZ\Publish\Core\REST\Client\SectionService::updateSection | ( | Section | $section,
|  | SectionUpdateStruct | $sectionUpdateStruct
| ) |  |

Updates the given in the content repository.

Exceptions

Implements eZ\Publish\API\Repository\SectionService.

Definition at line 111 of file Core/REST/Client/SectionService.php.

## Member Data Documentation

## ◆ $client

eZ\Publish\Core\REST\Client\SectionService::$client
| private

Definition at line 31 of file Core/REST/Client/SectionService.php.

Referenced by eZ\Publish\Core\REST\Client\SectionService\__construct().

## ◆ $inputDispatcher

eZ\Publish\Core\REST\Client\SectionService::$inputDispatcher
| private

Definition at line 34 of file Core/REST/Client/SectionService.php.

Referenced by eZ\Publish\Core\REST\Client\SectionService\__construct().

## ◆ $outputVisitor

eZ\Publish\Core\REST\Client\SectionService::$outputVisitor
| private

Definition at line 37 of file Core/REST/Client/SectionService.php.

Referenced by eZ\Publish\Core\REST\Client\SectionService\__construct().

## ◆ $requestParser

eZ\Publish\Core\REST\Client\SectionService::$requestParser
| private

Definition at line 40 of file Core/REST/Client/SectionService.php.

Referenced by eZ\Publish\Core\REST\Client\SectionService\__construct().

The documentation for this class was generated from the following file:

- Core/REST/Client/SectionService.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.