PHP Class eZ\Publish\Core\REST\Server\Controller\Section

Inheritance: extends eZ\Publish\Core\REST\Server\Controller
显示文件 Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$sectionService eZ\Publish\API\Repository\SectionService Section service.

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\SectionService $sectionService ) Construct controller.
createSection ( Request $request ) : CreatedSection Create new section.
deleteSection ( $sectionId ) : eZ\Publish\Core\REST\Server\Values\NoContent Delete a section by ID.
listSections ( Request $request ) : SectionList List sections.
loadSection ( $sectionId ) : eZ\Publish\API\Repository\Values\Content\Section Loads a section.
loadSectionByIdentifier ( Request $request ) : eZ\Publish\API\Repository\Values\Content\Section Loads section by identifier.
updateSection ( $sectionId, Request $request ) : eZ\Publish\API\Repository\Values\Content\Section Updates a section.

Protected Methods

Method Description
mapToUpdateStruct ( eZ\Publish\API\Repository\Values\Content\SectionCreateStruct $createStruct ) : eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct Maps a SectionCreateStruct to a SectionUpdateStruct.

Method Details

__construct() public method

Construct controller.
public __construct ( eZ\Publish\API\Repository\SectionService $sectionService )
$sectionService eZ\Publish\API\Repository\SectionService

createSection() public method

Create new section.
public createSection ( Request $request ) : CreatedSection
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\CreatedSection

deleteSection() public method

Delete a section by ID.
public deleteSection ( $sectionId ) : eZ\Publish\Core\REST\Server\Values\NoContent
$sectionId
return eZ\Publish\Core\REST\Server\Values\NoContent

listSections() public method

List sections.
public listSections ( Request $request ) : SectionList
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\SectionList

loadSection() public method

Loads a section.
public loadSection ( $sectionId ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionId
return eZ\Publish\API\Repository\Values\Content\Section

loadSectionByIdentifier() public method

Loads section by identifier.
public loadSectionByIdentifier ( Request $request ) : eZ\Publish\API\Repository\Values\Content\Section
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\API\Repository\Values\Content\Section

mapToUpdateStruct() protected method

Needed since both structs are encoded into the same media type on input.
protected mapToUpdateStruct ( eZ\Publish\API\Repository\Values\Content\SectionCreateStruct $createStruct ) : eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct
$createStruct eZ\Publish\API\Repository\Values\Content\SectionCreateStruct
return eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct

updateSection() public method

Updates a section.
public updateSection ( $sectionId, Request $request ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionId
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\API\Repository\Values\Content\Section

Property Details

$sectionService protected_oe property

Section service.
protected SectionService,eZ\Publish\API\Repository $sectionService
return eZ\Publish\API\Repository\SectionService