Neos\Neos\Service\ContentElementWrappingService::addDocumentMetadata PHP Метод

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

Collects metadata for the Neos backend specifically for document nodes.
protected addDocumentMetadata ( array $attributes, Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$attributes array
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат array
    protected function addDocumentMetadata(array $attributes, NodeInterface $node)
    {
        /** @var ContentContext $contentContext */
        $contentContext = $node->getContext();
        $attributes['data-neos-site-name'] = $contentContext->getCurrentSite()->getName();
        $attributes['data-neos-site-node-context-path'] = $contentContext->getCurrentSiteNode()->getContextPath();
        // Add the workspace of the content repository context to the attributes
        $attributes['data-neos-context-workspace-name'] = $contentContext->getWorkspaceName();
        $attributes['data-neos-context-dimensions'] = json_encode($contentContext->getDimensions());
        if (!$this->nodeAuthorizationService->isGrantedToEditNode($node)) {
            $attributes['data-node-__read-only'] = 'true';
            $attributes['data-nodedatatype-__read-only'] = 'boolean';
        }
        return $attributes;
    }