PHP Класс Sulu\Bundle\ContentBundle\Repository\NodeRepository

Наследование: implements Sulu\Bundle\ContentBundle\Repository\NodeRepositoryInterface
Показать файл Открыть проект

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

Метод Описание
__construct ( Sulu\Component\Content\Mapper\ContentMapperInterface $mapper, Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Sulu\Bundle\AdminBundle\UserManager\UserManagerInterface $userManager, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, Sulu\Component\Content\Query\ContentQueryBuilderInterface $queryBuilder, Sulu\Component\Content\Query\ContentQueryExecutorInterface $queryExecutor, Sulu\Component\Security\Authorization\AccessControl\AccessControlManagerInterface $accessControlManager, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null, Psr\Log\LoggerInterface $logger )
copyLocale ( $uuid, $userId, $webspaceKey, $srcLocale, $destLocales )
deleteNode ( $uuid, $webspaceKey )
getFilteredNodes ( array $filterConfig, $languageCode, $webspaceKey, $preview = false, $api = false, $exclude = [] )
getIndexNode ( $webspaceKey, $languageCode )
getNode ( $uuid, $webspaceKey, $languageCode, $breadcrumb = false, $complete = true, $loadGhostContent = false )
getNodes ( $parent, $webspaceKey, $languageCode, $depth = 1, $flat = true, $complete = true, $excludeGhosts = false )
getNodesByIds ( $ids, $webspaceKey, $languageCode )
getNodesTree ( $uuid, $webspaceKey, $languageCode, $excludeGhosts = false, $excludeShadows = false, $appendWebspaceNode = false )
getReferences ( $uuid )
getWebspaceNode ( $webspaceKey, $languageCode, $depth = 1, $excludeGhosts = false )
getWebspaceNodes ( $languageCode )
loadExtensionData ( $uuid, $extensionName, $webspaceKey, $languageCode )
orderAt ( $uuid, $position, $webspaceKey, $languageCode, $userId )
saveExtensionData ( $uuid, $data, $extensionName, $webspaceKey, $languageCode, $userId )
setApiBasePath ( string $apiBasePath )

Защищенные методы

Метод Описание
getFullNameByUserId ( integer $id ) : string returns user fullName.
getMapper ( ) : Sulu\Component\Content\Mapper\ContentMapperInterface return content mapper.
prepareNode ( Sulu\Component\Content\Compat\StructureInterface $structure, string $webspaceKey, string $languageCode, integer $depth = 1, boolean $complete = true, boolean $excludeGhosts = false, string | null $extension = null ) : array returns finished Node (with _links and _embedded).

Приватные методы

Метод Описание
createWebspaceNode ( $webspaceKey, $languageCode, $depth = 1, $excludeGhosts = false ) Creates a webspace node.
getParentNode ( string | null $parent, string $webspaceKey, string $languageCode ) : Sulu\Component\Content\Compat\StructureInterface if parent is null return home page else the page with given uuid.
iterateTiers ( array $tiers, array &$result ) Iterate over the ancestor tiers and build up the result.
loadNodeAndAncestors ( string $uuid, string $webspaceKey, string $locale, boolean $excludeGhosts, boolean $excludeShadows, boolean $complete ) : array Load the node and its ancestors and convert them into a HATEOAS representation.
prepareNodesTree ( Sulu\Component\Content\Compat\StructureInterface[] $nodes, string $webspaceKey, string $languageCode, boolean $complete = true, boolean $excludeGhosts = false, $maxDepth = 1, $currentDepth ) : array

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

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

public __construct ( Sulu\Component\Content\Mapper\ContentMapperInterface $mapper, Sulu\Component\PHPCR\SessionManager\SessionManagerInterface $sessionManager, Sulu\Bundle\AdminBundle\UserManager\UserManagerInterface $userManager, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, Sulu\Component\Content\Query\ContentQueryBuilderInterface $queryBuilder, Sulu\Component\Content\Query\ContentQueryExecutorInterface $queryExecutor, Sulu\Component\Security\Authorization\AccessControl\AccessControlManagerInterface $accessControlManager, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage = null, Psr\Log\LoggerInterface $logger )
$mapper Sulu\Component\Content\Mapper\ContentMapperInterface
$sessionManager Sulu\Component\PHPCR\SessionManager\SessionManagerInterface
$userManager Sulu\Bundle\AdminBundle\UserManager\UserManagerInterface
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface
$queryBuilder Sulu\Component\Content\Query\ContentQueryBuilderInterface
$queryExecutor Sulu\Component\Content\Query\ContentQueryExecutorInterface
$accessControlManager Sulu\Component\Security\Authorization\AccessControl\AccessControlManagerInterface
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
$logger Psr\Log\LoggerInterface

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

public copyLocale ( $uuid, $userId, $webspaceKey, $srcLocale, $destLocales )

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

public deleteNode ( $uuid, $webspaceKey )

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

public getFilteredNodes ( array $filterConfig, $languageCode, $webspaceKey, $preview = false, $api = false, $exclude = [] )
$filterConfig array

getFullNameByUserId() защищенный Метод

returns user fullName.
protected getFullNameByUserId ( integer $id ) : string
$id integer userId
Результат string

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

public getIndexNode ( $webspaceKey, $languageCode )

getMapper() защищенный Метод

return content mapper.
protected getMapper ( ) : Sulu\Component\Content\Mapper\ContentMapperInterface
Результат Sulu\Component\Content\Mapper\ContentMapperInterface

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

public getNode ( $uuid, $webspaceKey, $languageCode, $breadcrumb = false, $complete = true, $loadGhostContent = false )

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

public getNodes ( $parent, $webspaceKey, $languageCode, $depth = 1, $flat = true, $complete = true, $excludeGhosts = false )

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

public getNodesByIds ( $ids, $webspaceKey, $languageCode )

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

public getNodesTree ( $uuid, $webspaceKey, $languageCode, $excludeGhosts = false, $excludeShadows = false, $appendWebspaceNode = false )

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

public getReferences ( $uuid )

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

public getWebspaceNode ( $webspaceKey, $languageCode, $depth = 1, $excludeGhosts = false )

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

public getWebspaceNodes ( $languageCode )

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

public loadExtensionData ( $uuid, $extensionName, $webspaceKey, $languageCode )

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

public orderAt ( $uuid, $position, $webspaceKey, $languageCode, $userId )

prepareNode() защищенный Метод

returns finished Node (with _links and _embedded).
Устаревший: This part should be split into a serialization handler and using the hateoas bundle
protected prepareNode ( Sulu\Component\Content\Compat\StructureInterface $structure, string $webspaceKey, string $languageCode, integer $depth = 1, boolean $complete = true, boolean $excludeGhosts = false, string | null $extension = null ) : array
$structure Sulu\Component\Content\Compat\StructureInterface
$webspaceKey string
$languageCode string
$depth integer
$complete boolean
$excludeGhosts boolean
$extension string | null
Результат array

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

public saveExtensionData ( $uuid, $data, $extensionName, $webspaceKey, $languageCode, $userId )

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

public setApiBasePath ( string $apiBasePath )
$apiBasePath string