PHP Class eZ\Publish\Core\REST\Client\SectionService

See also: eZ\Publish\API\Repository\SectionService
Inheritance: implements eZ\Publish\API\Repository\SectionService, implements eZ\Publish\Core\REST\Client\Sessionable
Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
__construct ( eZ\Publish\Core\REST\Client\HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, eZ\Publish\Core\REST\Common\RequestParser $requestParser )
assignSection ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\Section $section ) Assigns the content to the given section this method overrides the current assigned section.
countAssignedContents ( eZ\Publish\API\Repository\Values\Content\Section $section ) : integer Counts the contents which $section is assigned to.
createSection ( eZ\Publish\API\Repository\Values\Content\SectionCreateStruct $sectionCreateStruct ) : eZ\Publish\API\Repository\Values\Content\Section Creates the a new Section in the content repository.
deleteSection ( eZ\Publish\API\Repository\Values\Content\Section $section ) Deletes $section from content repository.
isSectionUsed ( eZ\Publish\API\Repository\Values\Content\Section $section ) : boolean Returns true if the given section is assigned to contents, or used in role policies, or in role assignments.
loadSection ( mixed $sectionId ) : eZ\Publish\API\Repository\Values\Content\Section Loads a Section from its id ($sectionId).
loadSectionByIdentifier ( string $sectionIdentifier ) : eZ\Publish\API\Repository\Values\Content\Section Loads a Section from its identifier ($sectionIdentifier).
loadSections ( ) : array Loads all sections.
newSectionCreateStruct ( ) : eZ\Publish\API\Repository\Values\Content\SectionCreateStruct Instantiates a new SectionCreateStruct.
newSectionUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct Instantiates a new SectionUpdateStruct.
setSession ( mixed $id ) Set session ID.
updateSection ( eZ\Publish\API\Repository\Values\Content\Section $section, eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct $sectionUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Section Updates the given in the content repository.

Method Details

__construct() public method

public __construct ( eZ\Publish\Core\REST\Client\HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, eZ\Publish\Core\REST\Common\RequestParser $requestParser )
$client eZ\Publish\Core\REST\Client\HttpClient
$inputDispatcher eZ\Publish\Core\REST\Common\Input\Dispatcher
$outputVisitor eZ\Publish\Core\REST\Common\Output\Visitor
$requestParser eZ\Publish\Core\REST\Common\RequestParser

assignSection() public method

Assigns the content to the given section this method overrides the current assigned section.
public assignSection ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, eZ\Publish\API\Repository\Values\Content\Section $section )
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$section eZ\Publish\API\Repository\Values\Content\Section

countAssignedContents() public method

Counts the contents which $section is assigned to.
Deprecation: since 6.0
public countAssignedContents ( eZ\Publish\API\Repository\Values\Content\Section $section ) : integer
$section eZ\Publish\API\Repository\Values\Content\Section
return integer

createSection() public method

Creates the a new Section in the content repository.
public createSection ( eZ\Publish\API\Repository\Values\Content\SectionCreateStruct $sectionCreateStruct ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionCreateStruct eZ\Publish\API\Repository\Values\Content\SectionCreateStruct
return eZ\Publish\API\Repository\Values\Content\Section The newly create section

deleteSection() public method

Deletes $section from content repository.
public deleteSection ( eZ\Publish\API\Repository\Values\Content\Section $section )
$section eZ\Publish\API\Repository\Values\Content\Section

isSectionUsed() public method

This does not check user permissions.
Since: 6.0
public isSectionUsed ( eZ\Publish\API\Repository\Values\Content\Section $section ) : boolean
$section eZ\Publish\API\Repository\Values\Content\Section
return boolean

loadSection() public method

Loads a Section from its id ($sectionId).
public loadSection ( mixed $sectionId ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionId mixed
return eZ\Publish\API\Repository\Values\Content\Section

loadSectionByIdentifier() public method

Loads a Section from its identifier ($sectionIdentifier).
public loadSectionByIdentifier ( string $sectionIdentifier ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionIdentifier string
return eZ\Publish\API\Repository\Values\Content\Section

loadSections() public method

Loads all sections.
public loadSections ( ) : array
return array of {@link \eZ\Publish\API\Repository\Values\Content\Section}

newSectionCreateStruct() public method

Instantiates a new SectionCreateStruct.
public newSectionCreateStruct ( ) : eZ\Publish\API\Repository\Values\Content\SectionCreateStruct
return eZ\Publish\API\Repository\Values\Content\SectionCreateStruct

newSectionUpdateStruct() public method

Instantiates a new SectionUpdateStruct.
public newSectionUpdateStruct ( ) : eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct
return eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct

setSession() public method

Only for testing
public setSession ( mixed $id )
$id mixed

updateSection() public method

Updates the given in the content repository.
public updateSection ( eZ\Publish\API\Repository\Values\Content\Section $section, eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct $sectionUpdateStruct ) : eZ\Publish\API\Repository\Values\Content\Section
$section eZ\Publish\API\Repository\Values\Content\Section
$sectionUpdateStruct eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct
return eZ\Publish\API\Repository\Values\Content\Section