PHP Интерфейс Sulu\Component\Content\Mapper\ContentMapperInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
convertQueryResultToArray ( PHPCR\Query\QueryResultInterface $queryResult, string $webspaceKey, string[] $locales, array $fields, integer $maxDepth, $onlyPublished = true ) : array Converts a query result in a list of arrays.
copyLanguage ( string $uuid, $userId, $webspaceKey, $srcLanguageCode, $destLanguageCodes ) : Sulu\Component\Content\Compat\StructureInterface Copies the content from one node from one localization to the other.
delete ( string $uuid, string $webspaceKey ) deletes content with subcontent in given webspace.
load ( string $uuid, string $webspaceKey, string $languageCode, boolean $loadGhostContent = false ) : Sulu\Component\Content\Compat\StructureInterface returns the data from the given id.
loadBreadcrumb ( $uuid, $languageCode, $webspaceKey ) : Sulu\Component\Content\BreadcrumbItemInterface[] load breadcrumb for given uuid in given language.
loadByNode ( PHPCR\NodeInterface $contentNode, $localization, string $webspaceKey = null, boolean $excludeGhost = true, boolean $loadGhostContent = false, boolean $excludeShadow = true ) returns the data for the given node.
loadByParent ( string $uuid, string $webspaceKey, string $languageCode, integer $depth = 1, boolean $flat = true, boolean $ignoreExceptions = false, boolean $excludeGhosts = false ) : Sulu\Component\Content\Compat\StructureInterface[] returns a list of data from children of given node.
loadByQuery ( PHPCR\Query\QueryInterface $query, string $languageCode, string $webspaceKey, boolean $excludeGhost = true, boolean $loadGhostContent = false ) : Sulu\Component\Content\Compat\StructureInterface[] load Structures for the given QOM\QueryInterface instance.
loadBySql2 ( string $sql2, string $languageCode, string $webspaceKey, integer $limit = null ) : Sulu\Component\Content\Compat\StructureInterface[] returns the content returned by the given sql2 query as structures.
loadStartPage ( string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface returns the data from the given id.
orderAt ( string $uuid, integer $position, integer $userId, string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface brings a node with a given uuid into a given position.
orderBefore ( string $uuid, string $beforeUuid, integer $userId, string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface order node with uuid before the node with beforeUuid !IMPORTANT! both nodes should have the same parent.
saveExtension ( string $uuid, array $data, string $extensionName, string $webspaceKey, string $languageCode, integer $userId ) : Sulu\Component\Content\Compat\StructureInterface save a extension with given name and data to an existing node.

Описание методов

convertQueryResultToArray() публичный Метод

Converts a query result in a list of arrays.
public convertQueryResultToArray ( PHPCR\Query\QueryResultInterface $queryResult, string $webspaceKey, string[] $locales, array $fields, integer $maxDepth, $onlyPublished = true ) : array
$queryResult PHPCR\Query\QueryResultInterface
$webspaceKey string
$locales string[]
$fields array
$maxDepth integer
Результат array

copyLanguage() публичный Метод

Copies the content from one node from one localization to the other.
public copyLanguage ( string $uuid, $userId, $webspaceKey, $srcLanguageCode, $destLanguageCodes ) : Sulu\Component\Content\Compat\StructureInterface
$uuid string
$userId
$webspaceKey
$srcLanguageCode
$destLanguageCodes
Результат Sulu\Component\Content\Compat\StructureInterface

delete() публичный Метод

deletes content with subcontent in given webspace.
public delete ( string $uuid, string $webspaceKey )
$uuid string UUID of content
$webspaceKey string Key of webspace

load() публичный Метод

returns the data from the given id.
public load ( string $uuid, string $webspaceKey, string $languageCode, boolean $loadGhostContent = false ) : Sulu\Component\Content\Compat\StructureInterface
$uuid string UUID of the content
$webspaceKey string Key of webspace
$languageCode string Read data for given language
$loadGhostContent boolean True if also a ghost page should be returned, otherwise false
Результат Sulu\Component\Content\Compat\StructureInterface

loadBreadcrumb() публичный Метод

load breadcrumb for given uuid in given language.
Устаревший:
public loadBreadcrumb ( $uuid, $languageCode, $webspaceKey ) : Sulu\Component\Content\BreadcrumbItemInterface[]
$uuid
$languageCode
$webspaceKey
Результат Sulu\Component\Content\BreadcrumbItemInterface[]

loadByNode() публичный Метод

returns the data for the given node.
public loadByNode ( PHPCR\NodeInterface $contentNode, $localization, string $webspaceKey = null, boolean $excludeGhost = true, boolean $loadGhostContent = false, boolean $excludeShadow = true )
$contentNode PHPCR\NodeInterface The node for which to load the data
$webspaceKey string Key of the webspace
$excludeGhost boolean Do not return Ghost structures (return null instead)
$loadGhostContent boolean Load ghost content
$excludeShadow boolean Do not return shadow structures (return null instead)

loadByParent() публичный Метод

returns a list of data from children of given node.
public loadByParent ( string $uuid, string $webspaceKey, string $languageCode, integer $depth = 1, boolean $flat = true, boolean $ignoreExceptions = false, boolean $excludeGhosts = false ) : Sulu\Component\Content\Compat\StructureInterface[]
$uuid string The uuid of the parent node
$webspaceKey string The key of the webspace we are loading in
$languageCode string The requested content language
$depth integer The depth of the search
$flat boolean If true, the result is a flat list
$ignoreExceptions boolean
$excludeGhosts boolean If true ghost pages are also loaded
Результат Sulu\Component\Content\Compat\StructureInterface[]

loadByQuery() публичный Метод

load Structures for the given QOM\QueryInterface instance.
public loadByQuery ( PHPCR\Query\QueryInterface $query, string $languageCode, string $webspaceKey, boolean $excludeGhost = true, boolean $loadGhostContent = false ) : Sulu\Component\Content\Compat\StructureInterface[]
$query PHPCR\Query\QueryInterface The query, which returns the content
$languageCode string The language code
$webspaceKey string The webspace key
$excludeGhost boolean
$loadGhostContent boolean
Результат Sulu\Component\Content\Compat\StructureInterface[]

loadBySql2() публичный Метод

returns the content returned by the given sql2 query as structures.
public loadBySql2 ( string $sql2, string $languageCode, string $webspaceKey, integer $limit = null ) : Sulu\Component\Content\Compat\StructureInterface[]
$sql2 string The query, which returns the content
$languageCode string The language code
$webspaceKey string The webspace key
$limit integer Limits the number of returned rows
Результат Sulu\Component\Content\Compat\StructureInterface[]

loadStartPage() публичный Метод

returns the data from the given id.
public loadStartPage ( string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface
$webspaceKey string Key of webspace
$languageCode string Read data for given language
Результат Sulu\Component\Content\Compat\StructureInterface

orderAt() публичный Метод

brings a node with a given uuid into a given position.
public orderAt ( string $uuid, integer $position, integer $userId, string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface
$uuid string
$position integer
$userId integer
$webspaceKey string
$languageCode string
Результат Sulu\Component\Content\Compat\StructureInterface

orderBefore() публичный Метод

order node with uuid before the node with beforeUuid !IMPORTANT! both nodes should have the same parent.
public orderBefore ( string $uuid, string $beforeUuid, integer $userId, string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface
$uuid string
$beforeUuid string
$userId integer
$webspaceKey string
$languageCode string
Результат Sulu\Component\Content\Compat\StructureInterface

saveExtension() публичный Метод

save a extension with given name and data to an existing node.
public saveExtension ( string $uuid, array $data, string $extensionName, string $webspaceKey, string $languageCode, integer $userId ) : Sulu\Component\Content\Compat\StructureInterface
$uuid string
$data array
$extensionName string
$webspaceKey string
$languageCode string
$userId integer
Результат Sulu\Component\Content\Compat\StructureInterface