Neos.ContentRepository/Classes/Domain/Factory/NodeFactory.php
protected function filterNodeByContext(NodeInterface $node, Context $context)
    {
        $this->securityContext->withoutAuthorizationChecks(function () use (&$node, $context) {
            if (!$context->isRemovedContentShown() && $node->isRemoved()) {
                $node = null;
                return;
            }
            if (!$context->isInvisibleContentShown() && !$node->isVisible()) {
                $node = null;
                return;
            }
            if (!$context->isInaccessibleContentShown() && !$node->isAccessible()) {
                $node = null;
            }
        });
        return $node;
    }
protected function filterNodeByContext(NodeInterface $node, Context $context)
    {
        $this->securityContext->withoutAuthorizationChecks(function () use (&$node, $context) {
            if (!$context->isRemovedContentShown() && $node->isRemoved()) {
                $node = null;
                return;
            }
            if (!$context->isInvisibleContentShown() && !$node->isVisible()) {
                $node = null;
                return;
            }
            if (!$context->isInaccessibleContentShown() && !$node->isAccessible()) {
                $node = null;
            }
        });
        return $node;
    }
protected function filterNodeByContext ( NodeInterface $ node , Context $ context ) { $ this -> securityContext -> withoutAuthorizationChecks ( function ( ) use ( & $ node , $ context ) { if ( ! $ context -> isRemovedContentShown ( ) && $ node -> isRemoved ( ) ) { $ node = null ; return ; } if ( ! $ context -> isInvisibleContentShown ( ) && ! $ node -> isVisible ( ) ) { $ node = null ; return ; } if ( ! $ context -> isInaccessibleContentShown ( ) && ! $ node -> isAccessible ( ) ) { $ node = null ; } } ) ; return $ node ; }
Filter a node by the current context.
Will either return the node or NULL if it is not permitted in current context.

@param NodeInterface $node
@param Context $context
@return NodeInterface|NULL
Filter a node by the current context . Will either return the node or NULL if it is not permitted in current context .