@param string $globalId

@return NodeInterface
14793
private function decodeID(string $globalId): NodeInterface
    {
        try {
            $node = IDEncoder::decode($globalId);
            if (!$node) {
                throw new EntityNotFoundException();
            }

            return $node;
        } catch (EntityNotFoundException $exception) {
            throw new NotFoundError(sprintf('The given Node "%s" does not exists.', $globalId));
        }
    }
556900
public function getGlobalCSS($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_GLOBAL_CSS,
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
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();
    }
896671
public function removeChild(string $childId, bool $setParent = true): NodeInterface
    {
        if ($this->hasChild($childId)) {
            $child = $this->getChild($childId);

            if ($setParent) {
                $child->removeParent($this->getId(), false);
            }

            unset($this->_children[$childId]);

            $this->notifySubscribers(
                self::EVENT_REMOVE_CHILD,
                ['parent' => $this, 'child' => $child]
            );

            /** @var NodeInterface $parent */
            foreach ($this->getAllParents() as $parent) {
                $child->removeSubscriber($parent->getId());
            }
        }

        return $this;
    }
1192368
public function getNativelyNodeChildren($nodeUid)
    {
        $query = $this->createQueryBuilder('s')
                ->select('s._uid', 's._leftnode')
                ->where('s._parent = :node')
                ->addOrderBy('s._leftnode', 'asc')
                ->addOrderBy('s._modified', 'desc')
                ->getQuery()
                ->getSQL();

        $result = $this->getEntityManager()
                ->getConnection()
                ->executeQuery((string) $query, [$nodeUid], [\Doctrine\DBAL\Types\Type::STRING])
                ->fetchAll();

        return Collection::array_column($result, 'uid0');
    }
1190770
public function findGmailUserById(string $userId)
    {
        foreach ($this->gmailUsers as $user) {
            /** @var GmailUserInterface $user */
            if ($user->getUserId() === $userId) {
                return $user;
            }
        }

        return;
    }
1311775
public function getNodeRef($nodeId, $lang = null)
    {
        $this->initNodeVersions();

        $lang = $lang ?: $this->currentLocale->getCurrentLocale();

        return isset($this->nodeRefs[$lang][$nodeId]) ? $this->nodeRefs[$lang][$nodeId] : null;
    }
483767
def inject_global(node: Node, global_key: str, inject_key: Any):
    """"""
    value = get_current_scope().container.get(inject_key)
    set_global(node, global_key, value)
485108
public function clearParents(): NodeInterface
    {
        /** @var NodeInterface $parent */
        foreach ($this->getParents() as $parent) {
            $this->removeParent($parent->getId());
        }

        return $this;
    }
30734
protected function getUser4Id($userId): ?UserInterface
    {
        /** @var \PServerCore\Entity\Repository\User $userRepository */
        $userRepository = $this->entityManager->getRepository($this->entityOptions->getUser());

        return $userRepository->getUser4Id($userId);
    }
231633
public function findDistinctByRootId($rootId)
    {
        $qb = $this->createQueryBuilder('l')
            ->andWhere('l.rootId = :rootId')
            ->groupBy('l.rootVersion')
            ->setParameter('rootId', $rootId);

        return $qb->getQuery()->getResult();
    }
1058734
function generateOpenGraphTags( $nodeID )
    {
        $this->ogIni = eZINI::instance( 'ngopengraph.ini' );
        $this->facebookCompatible = $this->ogIni->variable( 'General', 'FacebookCompatible' );
        $this->debug = $this->ogIni->variable( 'General', 'Debug' ) == 'enabled';

        $availableClasses = $this->ogIni->variable( 'General', 'Classes' );

        if ( $nodeID instanceof eZContentObjectTreeNode )
        {
            $contentNode = $nodeID;
        }
        else
        {
            $contentNode = eZContentObjectTreeNode::fetch( $nodeID );
            if ( !$contentNode instanceof eZContentObjectTreeNode )
            {
                return array();
            }
        }

        $contentObject = $contentNode->object();

        if ( !$contentObject instanceof eZContentObject || !in_array( $contentObject->contentClassIdentifier(), $availableClasses ) )
        {
            return array();
        }

        $returnArray = $this->processGenericData( $contentNode );

        $returnArray = $this->processObject( $contentObject, $returnArray );

        if ( $this->checkRequirements( $returnArray ) )
        {
            return $returnArray;
        }
        else
        {
            if ( $this->debug )
            {
                eZDebug::writeDebug( 'No', 'Facebook Compatible?' );
            }

            return array();
        }
    }
1203947
public function setAggregateRootId($aggregateRootId)
    {
        if (null !== $this->aggregateRootId && $aggregateRootId !== $this->aggregateRootId) {
            $eventName = new EventName($this);
            throw new RuntimeException(
                sprintf(
                    'Event %s: The aggregate root id is already set and is different from the one given.',
                    $eventName
                )
            );
        }

        $this->aggregateRootId = $aggregateRootId;
    }
756572
public static function nodeChildren($parentId)
    {
        $parentId = intval($parentId);
        if (!static::$caching || empty(static::$_children[$parentId])) {
            $query = static::find()
                ->where(['parent_id' => $parentId])
                ->orderBy(static::$defaultOrderBy);
            $childList = $query
              //->asArray()
                ->all();
            if (static::$caching) {
                static::$_children[$parentId] = $childList;
            } else {
                return $childList;
            }
        }
        return static::$_children[$parentId];
    }
1273412
public static function createFromGlobals(array $globals = null) : Request
    {
        $globals = $globals === null
                ? Uri::fixSchemeProxyFromGlobals($_SERVER)
                : $globals;

        $method        = isset($globals['REQUEST_METHOD']) ? $globals['REQUEST_METHOD'] : null;
        $method        = $method ? strtoupper($method) : $method;
        $uri           = Uri::createFromGlobals($globals);
        $body          = new RequestBody();
        $uploadedFiles = UploadedFile::createFromGlobals($globals);
        $headers       = static::parseForHeadersFromGlobal($globals);
        $request       = new static($method, $uri, $headers, $globals, [], $body, $uploadedFiles);
        $cookies       = Cookies::parseHeader($request->getHeader('Cookie'));

        /**
         * @var Request $request
         */
        $request = $request->withCookieParams($cookies);
        if ($method === 'POST' && in_array(
            $request->getMediaType(),
            ['application/x-www-form-urlencoded', 'multipart/form-data']
        )) {
            // parsed body must be $_POST
            $request = $request->withParsedBody($_POST);
        }

        return $request;
    }
1243735
private function getGlobal(string $global, string $name)
    {
        if (!isset($GLOBALS[$global]) // Global does not exist
            || !is_array($GLOBALS[$global]) // Global is not an array
            || ($name && !isset($GLOBALS[$global][$name])) // Global variable does not exist
        ) {
            return null;
        }
        if (!$name) {
            return $GLOBALS[$global]; // return entire Global array
        }

        return $GLOBALS[$global][$name]; // return requested Global variable
    }
222013
public static function createFromGlobal(array $globals = [])
    {
        $server  = self::arrayGet($globals, '_SERVER', $_SERVER);
        $files   = self::arrayGet($globals, '_FILES', $_FILES);
        $cookies = self::arrayGet($globals, '_COOKIE', $_COOKIE);
        $query   = self::arrayGet($globals, '_GET', $_GET);
        $body    = self::arrayGet($globals, '_POST', $_POST);
        $request = ServerRequestFactory::fromGlobals(
            $server,
            $query,
            $body,
            $cookies,
            $files
        );

        return $request;
    }