PageService extends PageService
in package
Uses ServiceTrait, SetRelatedItemsTrait

This is the PageService class.

Remember that a service is an extension of a SDK model that allows to add additional actions to a model request or create new methods to simplify some common requests. In this case, the PageService extends the SDK\Services\PageService.

Tags
see
PageService::getPageById()
see
PageService::getPagesByIdList()
see
PageService::getPageByPId()
see
PageService::getPagesByPosition()
see
PageService::getPagesByPositionList()
see
PageService::getPagesByPagesGroupId()
see
PageService::getPagesByPagesGroupIdList()
see
PageService::getPagesByPagesGroupPId()
see
PageService::getPagesBySearchCriteria()
see
PageService::addGetPageById()
see
PageService::addGetPagesByIdList()
see
PageService::addGetPageByPId()
see
PageService::addGetPagesByPosition()
see
PageService::addGetPagesByPositionList()
see
PageService::addGetPagesByPagesGroupId()
see
PageService::addGetPagesByPagesGroupIdList()
see
PageService::addGetPagesByPagesGroupPId()
see
PageService::addGetPagesBySearchCriteria()
see
PageService
see
ServiceTrait
see
SetRelatedItemsTrait

Table of Contents

addGetPageById() This method adds the batch request to get the page whose id matches the given one.  : void
addGetPageByPId() This method adds the batch request to get the page whose pId matches the given one.  : void
addGetPagesByIdList() This method adds the batch request to get those pages whose id matches any of the given idList.  : void
addGetPagesByPagesGroupId() This method adds the batch request to get the pages whose pagesGroupId matches the given one.  : void
addGetPagesByPagesGroupIdList() This method adds the batch request to get those pages whose pagesGroupId matches any of the given idList.  : void
addGetPagesByPagesGroupPId() This method adds the batch request to get the pages whose pagesGroupPId matches the given one.  : void
addGetPagesByParentId() This method adds the batch request to get the pages by parent id.  : void
addGetPagesByPosition() This method adds the batch request to get the pages whose position matches the given one.  : void
addGetPagesByPositionList() This method adds the batch request to get those pages whose position matches any of the given idList.  : void
addGetPagesBySearchCriteria() This method adds the batch request to get the pages that match the given search criteria.  : void
buildElementCollection() This method returns and ElementCollection from the given data and class  : bool
generateParametersGroupFromArray() This method sets a parametersGroup object with the filters indicated in params (array key=>value).  : array<string|int, mixed>
getPageById() This method returns the Dto of the page whose id matches the given one.  : Page|null
getPageByPId() This method returns the Dto of the page whose pId matches the given one.  : Page|null
getPagesByIdList() This method returns the Dtos of those pages whose id matches any of the given list.  : ElementCollection|null
getPagesByPagesGroupId() This method returns the Dto of the pages whose pagesGroupId matches the given one.  : ElementCollection|null
getPagesByPagesGroupIdList() This method returns the Dtos of those pages whose pagesGroupId matches any of the given list.  : ElementCollection|null
getPagesByPagesGroupPId() This method returns the Dto of the pages whose pagesGroupPId matches the given one.  : ElementCollection|null
getPagesByParentId() This method returns the Dtos of the pages whose parent id matches the given one.  : Page
getPagesByPosition() This method returns the Dtos of those pages whose position matches the given one.  : ElementCollection|null
getPagesByPositionList() This method returns the Dtos of those pages whose position matches any of the given list.  : ElementCollection|null
getPagesBySearchCriteria() This method returns the Dtos of the pages that match the given search criteria.  : ElementCollection|null
validateParameterGroup() This method validates the given parametersGroup. Returns true if valid, false otherwise.  : bool
getAllElementCollectionItems() Returns all available items filtered with the given parameters  : ElementCollection|null

Methods

addGetPageById()

This method adds the batch request to get the page whose id matches the given one.

public addGetPageById(BatchRequests $batchRequests, string $batchName, int $id[, int $level = 1 ]) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$id : int
$level : int = 1
Return values
void

addGetPageByPId()

This method adds the batch request to get the page whose pId matches the given one.

public addGetPageByPId(BatchRequests $batchRequests, string $batchName, string $pId) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$pId : string
Return values
void

addGetPagesByIdList()

This method adds the batch request to get those pages whose id matches any of the given idList.

public addGetPagesByIdList(BatchRequests $batchRequests, string $batchName, string $idList) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$idList : string
Return values
void

addGetPagesByPagesGroupId()

This method adds the batch request to get the pages whose pagesGroupId matches the given one.

public addGetPagesByPagesGroupId(BatchRequests $batchRequests, string $batchName, int $pagesGroupId) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$pagesGroupId : int
Return values
void

addGetPagesByPagesGroupIdList()

This method adds the batch request to get those pages whose pagesGroupId matches any of the given idList.

public addGetPagesByPagesGroupIdList(BatchRequests $batchRequests, string $batchName, string $pagesGroupIdList) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$pagesGroupIdList : string
Return values
void

addGetPagesByPagesGroupPId()

This method adds the batch request to get the pages whose pagesGroupPId matches the given one.

public addGetPagesByPagesGroupPId(BatchRequests $batchRequests, string $batchName, string $pagesGroupPId) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$pagesGroupPId : string
Return values
void

addGetPagesByParentId()

This method adds the batch request to get the pages by parent id.

public addGetPagesByParentId(BatchRequests $batchRequests, string $batchName, int $id) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$id : int
Return values
void

addGetPagesByPosition()

This method adds the batch request to get the pages whose position matches the given one.

public addGetPagesByPosition(BatchRequests $batchRequests, string $batchName, int $position) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$position : int
Return values
void

addGetPagesByPositionList()

This method adds the batch request to get those pages whose position matches any of the given idList.

public addGetPagesByPositionList(BatchRequests $batchRequests, string $batchName, string $positionList) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$positionList : string
Return values
void

addGetPagesBySearchCriteria()

This method adds the batch request to get the pages that match the given search criteria.

public addGetPagesBySearchCriteria(BatchRequests $batchRequests, string $batchName, string $searchCriteria) : void
Parameters
$batchRequests : BatchRequests
$batchName : string

the name that will identify the request on the batch return.

$searchCriteria : string
Return values
void

buildElementCollection()

This method returns and ElementCollection from the given data and class

public buildElementCollection(array<string|int, mixed> $data, string $class) : bool
Parameters
$data : array<string|int, mixed>
$class : string
Return values
bool

generateParametersGroupFromArray()

This method sets a parametersGroup object with the filters indicated in params (array key=>value).

public generateParametersGroupFromArray(ParametersGroup &$parametersGroup, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$parametersGroup : ParametersGroup
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

with the applied filters

getPageById()

This method returns the Dto of the page whose id matches the given one.

public getPageById(int $id[, int $level = 1 ]) : Page|null
Parameters
$id : int
$level : int = 1
Return values
Page|null

getPageByPId()

This method returns the Dto of the page whose pId matches the given one.

public getPageByPId(string $pId) : Page|null
Parameters
$pId : string
Return values
Page|null

getPagesByIdList()

This method returns the Dtos of those pages whose id matches any of the given list.

public getPagesByIdList(string $idList) : ElementCollection|null
Parameters
$idList : string
Return values
ElementCollection|null

getPagesByPagesGroupId()

This method returns the Dto of the pages whose pagesGroupId matches the given one.

public getPagesByPagesGroupId(int $pagesGroupId) : ElementCollection|null
Parameters
$pagesGroupId : int
Return values
ElementCollection|null

getPagesByPagesGroupIdList()

This method returns the Dtos of those pages whose pagesGroupId matches any of the given list.

public getPagesByPagesGroupIdList(string $pagesGroupIdList) : ElementCollection|null
Parameters
$pagesGroupIdList : string
Return values
ElementCollection|null

getPagesByPagesGroupPId()

This method returns the Dto of the pages whose pagesGroupPId matches the given one.

public getPagesByPagesGroupPId(string $pagesGroupPId) : ElementCollection|null
Parameters
$pagesGroupPId : string
Return values
ElementCollection|null

getPagesByParentId()

This method returns the Dtos of the pages whose parent id matches the given one.

public getPagesByParentId(int $id) : Page
Parameters
$id : int
Return values
Page

ElementCollection|NULL

getPagesByPosition()

This method returns the Dtos of those pages whose position matches the given one.

public getPagesByPosition(int $position) : ElementCollection|null
Parameters
$position : int
Return values
ElementCollection|null

getPagesByPositionList()

This method returns the Dtos of those pages whose position matches any of the given list.

public getPagesByPositionList(string $positionList) : ElementCollection|null
Parameters
$positionList : string
Return values
ElementCollection|null

getPagesBySearchCriteria()

This method returns the Dtos of the pages that match the given search criteria.

public getPagesBySearchCriteria(string $searchCriteria) : ElementCollection|null
Parameters
$searchCriteria : string
Return values
ElementCollection|null

validateParameterGroup()

This method validates the given parametersGroup. Returns true if valid, false otherwise.

public validateParameterGroup(ParametersGroup $parametersGroup) : bool
Parameters
$parametersGroup : ParametersGroup
Return values
bool

getAllElementCollectionItems()

Returns all available items filtered with the given parameters

protected getAllElementCollectionItems(string $elementClass, string $resource, ParametersGroup $params) : ElementCollection|null
Parameters
$elementClass : string
$resource : string
$params : ParametersGroup

object with the needed filters to send to the API resource

Return values
ElementCollection|null

Search results