@param NodeTranslation $nodeTranslation
@param bool            $isPublic

@return bool
969770
private function isNodeVersionLocked(NodeTranslation $nodeTranslation, $isPublic)
    {
        if ($this->container->getParameter('kunstmaan_node.lock_enabled')) {
            /** @var NodeVersionLockHelper $nodeVersionLockHelper */
            $nodeVersionLockHelper = $this->get('kunstmaan_node.admin_node.node_version_lock_helper');
            $nodeVersionIsLocked = $nodeVersionLockHelper->isNodeVersionLocked($this->getUser(), $nodeTranslation, $isPublic);

            return $nodeVersionIsLocked;
        }

        return false;
    }
65742
protected function renderDefaultSearchView(
        NodeTranslation $nodeTranslation,
        HasPagePartsInterface $page,
        EngineInterface $renderer
    ) {
        $pageparts = $this->indexablePagePartsService->getIndexablePageParts($page);
        $view = 'KunstmaanNodeSearchBundle:PagePart:view.html.twig';
        $content = $this->removeHtml(
            $renderer->render(
                $view,
                array(
                    'locale' => $nodeTranslation->getLang(),
                    'page' => $page,
                    'pageparts' => $pageparts,
                    'indexMode' => true,
                )
            )
        );

        return $content;
    }
777576
protected function enforceIsATraversable()
    {
        if ($this->isFlow()) {
            if ($this->isATraversable) {
                throw new NodalFlowException('Cannot Traverse a Branch');
            }

            return $this;
        }

        if ($this->isATraversable) {
            if (!($this instanceof TraversableNodeInterface)) {
                throw new NodalFlowException('Cannot Traverse a Node that does not implement TraversableNodeInterface');
            }

            return $this;
        }

        if (!($this instanceof ExecNodeInterface)) {
            throw new NodalFlowException('Cannot Exec a Node that does not implement ExecNodeInterface');
        }

        return $this;
    }
101671
public function setTranslation($locale, $translation, $isUpdate = true)
    {
        $this->offsetSet($locale, $translation);
        if ($isUpdate) {
            $this->setIsModified(true);
        }
    }
268511
public function isTransformable(NodeData $node)
    {
        return $this->nodeTypeManager->hasNodeType($this->newType) && !$this->nodeTypeManager->getNodeType($this->newType)->isAbstract();
    }
176388
protected function addPageContent(NodeTranslation $nodeTranslation, $page, &$doc)
    {
        $this->enterRequestScope($nodeTranslation->getLang());
        if ($this->logger) {
            $this->logger->debug(
                sprintf(
                    'Indexing page "%s" / lang : %s / type : %s / id : %d / node id : %d',
                    $page->getTitle(),
                    $nodeTranslation->getLang(),
                    get_class($page),
                    $page->getId(),
                    $nodeTranslation->getNode()->getId()
                )
            );
        }

        $renderer = $this->container->get('templating');
        $doc['content'] = '';

        if ($page instanceof SearchViewTemplateInterface) {
            $doc['content'] = $this->renderCustomSearchView($nodeTranslation, $page, $renderer);

            return null;
        }

        if ($page instanceof HasPagePartsInterface) {
            $doc['content'] = $this->renderDefaultSearchView($nodeTranslation, $page, $renderer);

            return null;
        }
    }
991763
public function isProduction(bool $isProduction = null)
    {
        return $isProduction === null
            ? $this->isProduction
            : $this->isProduction = $isProduction;
    }
1222056
protected function addPageToIndex(
        NodeTranslation $nodeTranslation,
        Node $node,
        NodeVersion $publicNodeVersion,
        HasNodeInterface $page
    ) {
        $rootNode = $this->currentTopNode;
        if (!$rootNode) {
            // Fetch main parent of current node...
            $rootNode = $this->em->getRepository('KunstmaanNodeBundle:Node')->getRootNodeFor(
                $node,
                $nodeTranslation->getLang()
            );
        }

        $doc = array(
            'root_id' => $rootNode->getId(),
            'node_id' => $node->getId(),
            'node_translation_id' => $nodeTranslation->getId(),
            'node_version_id' => $publicNodeVersion->getId(),
            'title' => $nodeTranslation->getTitle(),
            'slug' => $nodeTranslation->getFullSlug(),
            'page_class' => ClassLookup::getClass($page),
            'created' => $this->getUTCDateTime(
                $nodeTranslation->getCreated()
            )->format(\DateTime::ISO8601),
            'updated' => $this->getUTCDateTime(
                $nodeTranslation->getUpdated()
            )->format(\DateTime::ISO8601),
        );
        if ($this->logger) {
            $this->logger->info('Indexing document : ' . implode(', ', $doc));
        }

        // Permissions
        $this->addPermissions($node, $doc);

        // Search type
        $this->addSearchType($page, $doc);

        // Parent and Ancestors
        $this->addParentAndAncestors($node, $doc);

        // Content
        $this->addPageContent($nodeTranslation, $page, $doc);

        // Add document to index
        $uid = 'nodetranslation_' . $nodeTranslation->getId();

        $this->addCustomData($page, $doc);

        $this->documents[] = $this->searchProvider->createDocument(
            $uid,
            $doc,
            $this->indexName . '_' . $nodeTranslation->getLang(),
            $this->indexType
        );
    }
1310632
public function addNodeTranslation(NodeTranslation $nodeTranslation)
    {
        $this->nodeTranslations[] = $nodeTranslation;
        $nodeTranslation->setNode($this);

        return $this;
    }
986605
public function isPublic()
    {
        if ($this->getIsActive() && ($this->getPublishAt()->getTimestamp() < time()) && (!$this->getExpiresAt() || $this->getExpiresAt()->getTimestamp() > time())) {
            return true;
        }

        return false;
    }
1133676
private function getNodeTranslationMap()
    {
        if (is_null($this->nodeTranslationMap)) {
            $sql = 'SELECT id, url, lang FROM kuma_node_translations';
            $stmt = $this->em->getConnection()->prepare($sql);
            $stmt->execute();
            $this->nodeTranslationMap = $stmt->fetchAll();
        }

        return $this->nodeTranslationMap;
    }
325246
public function check($action, NodeRef &$nodeRef, &$newData = null, $isRead = false)
    {
        return $this->checkInternal($action, $nodeRef, $newData, false, $isRead);
    }
168188
public function getUsersWithNodeVersionLock(NodeTranslation $nodeTranslation, $isPublicNodeVersion, BaseUser $userToExclude = null)
    {
        return  array_reduce(
            $this->getNodeVersionLocksByNodeTranslation($nodeTranslation, $isPublicNodeVersion, $userToExclude),
            function ($return, NodeVersionLock $item) {
                $return[] = $item->getOwner();

                return $return;
            },
            []
        );
    }
592668
public function setIsUnaryOperator($isUnaryOperator = true)
    {
        if (! is_a($this->getSymbol(), AbstractOperator::class)) {
            throw new \InvalidArgumentException(
                'Error: Cannot mark node as unary operator, because symbol is not an operator but of type "'.
                gettype($this->getSymbol()).'"'
            );
        }

        $this->isUnaryOperator = $isUnaryOperator;
    }
660150
public function getNodeTranslationByNodeIdQueryBuilder($nodeId, $lang)
    {
        $qb = $this->createQueryBuilder('nt')
            ->select('nt')
            ->innerJoin('nt.node', 'n', 'WITH', 'nt.node = n.id')
            ->where('n.deleted != 1')
            ->andWhere('nt.online = 1')
            ->andWhere('nt.lang = :lang')
            ->setParameter('lang', $lang)
            ->andWhere('n.id = :node_id')
            ->setParameter('node_id', $nodeId)
            ->setFirstResult(0)
            ->setMaxResults(1);

        return $qb->getQuery()->getOneOrNullResult();
    }
771779
public function getPath($path = null, $isPublic = false)
    {
        $path = RouterHelper::normalizeUrl($path);
        $assetFile = $this->skinPath . $path;

        if (File::isFile($assetFile)) {
            return $isPublic
                ? $this->publicSkinPath . $path
                : $this->skinPath . $path;
        }

        return $isPublic
            ? $this->defaultPublicSkinPath . $path
            : $this->defaultSkinPath . $path;
    }
1037011
protected function isExclusion($className, $methodName, $isPublic)
    {
        foreach ($this->exclusions as $classRegExp => $excludedMethods) {
            if (preg_match($classRegExp, $className)) {
                return ($excludedMethods[0] == '*' && $isPublic) || in_array($methodName, $excludedMethods);
            }
        }

        return false;
    }