PHP Class Sulu\Bundle\ContentBundle\Repository\NodeRepository

Inheritance: implements Sulu\Bundle\ContentBundle\Repository\NodeRepositoryInterface
Afficher le fichier Open project: sulu/sulu

Méthodes publiques

Méthode Description
__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 )

Méthodes protégées

Méthode Description
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).

Private Methods

Méthode Description
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

Method Details

__construct() public méthode

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 méthode

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

deleteNode() public méthode

public deleteNode ( $uuid, $webspaceKey )

getFilteredNodes() public méthode

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

getFullNameByUserId() protected méthode

returns user fullName.
protected getFullNameByUserId ( integer $id ) : string
$id integer userId
Résultat string

getIndexNode() public méthode

public getIndexNode ( $webspaceKey, $languageCode )

getMapper() protected méthode

return content mapper.
protected getMapper ( ) : Sulu\Component\Content\Mapper\ContentMapperInterface
Résultat Sulu\Component\Content\Mapper\ContentMapperInterface

getNode() public méthode

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

getNodes() public méthode

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

getNodesByIds() public méthode

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

getNodesTree() public méthode

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

getReferences() public méthode

public getReferences ( $uuid )

getWebspaceNode() public méthode

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

getWebspaceNodes() public méthode

public getWebspaceNodes ( $languageCode )

loadExtensionData() public méthode

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

orderAt() public méthode

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

prepareNode() protected méthode

returns finished Node (with _links and _embedded).
Deprecation: 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
Résultat array

saveExtensionData() public méthode

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

setApiBasePath() public méthode

public setApiBasePath ( string $apiBasePath )
$apiBasePath string