Sulu\Bundle\ContentBundle\Controller\NodeController::getTreeContent PHP Метод

getTreeContent() приватный Метод

Returns tree response for given uuid.
private getTreeContent ( string $uuid, string $locale, string $webspaceKey, boolean $webspaceNodes, Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, Sulu\Component\Security\Authentication\UserInterface $user ) : Response
$uuid string
$locale string
$webspaceKey string
$webspaceNodes boolean
$mapping Sulu\Component\Content\Repository\Mapping\MappingInterface
$user Sulu\Component\Security\Authentication\UserInterface
Результат Symfony\Component\HttpFoundation\Response
    private function getTreeContent($uuid, $locale, $webspaceKey, $webspaceNodes, MappingInterface $mapping, UserInterface $user)
    {
        if (!in_array($webspaceNodes, [static::WEBSPACE_NODE_SINGLE, static::WEBSPACE_NODES_ALL, null])) {
            throw new ParameterDataTypeException(get_class($this), 'webspace-nodes');
        }
        try {
            $contents = $this->get('sulu_content.content_repository')->findParentsWithSiblingsByUuid($uuid, $locale, $webspaceKey, $mapping, $user);
        } catch (ItemNotFoundException $e) {
            throw new EntityNotFoundException('node', $uuid, $e);
        }
        if ($webspaceNodes === static::WEBSPACE_NODES_ALL) {
            $contents = $this->getWebspaceNodes($mapping, $contents, $webspaceKey, $locale, $user);
        } elseif ($webspaceNodes === static::WEBSPACE_NODE_SINGLE) {
            $contents = $this->getWebspaceNode($mapping, $contents, $webspaceKey, $locale, $user);
        }
        $view = $this->view(new CollectionRepresentation($contents, static::$relationName));
        return $this->handleView($view);
    }