@param string $nodeType
@param mixed  $databaseId

@return string
558492
public static function encode($nodeType, $databaseId)
    {
        @trigger_error(
            'IDEncoder::encode has been deprecated since v1.1 and will be removed in v2.0, use IDEncoder::encode() instead',
            E_USER_DEPRECATED
        );

        return base64_encode(sprintf('%s%s%s', $nodeType, self::DIVIDER, $databaseId));
    }
44754
public static function setDbType($dbType) {
        $dbTypeCast = (string) $dbType;
        
        if (array_search($dbTypeCast, self::$dbList) === false) {
            throw new DBException('Illegal database type provided to DB Service');
        }
        
        self::$dbType = $dbTypeCast;
    }
855472
public function buildForm(NodeTypeContract $nodeType)
    {
        $this->formBuilder->build($nodeType->getName(), $nodeType->getFields());
    }
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');
    }
1299454
public function getHtml($nodeId, $level)
    {
        $node = $this->nodes[$nodeId];
        $storeId = $this->_storeManager->getStore()->getId();

        if (isset($this->content[$node->getContent()])) {
            $content = $this->content[$node->getContent()];
            $content = $this->filterProvider->getBlockFilter()->setStoreId($storeId)->filter($content);

            return $content;
        }

        return '';
    }
823355
protected function getNodeDataByNodeTypeAndWorkspace($nodeType, $workspaceName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();

        $queryBuilder->select('n')
            ->distinct()
            ->from(NodeData::class, 'n')
            ->where('n.nodeType = :nodeType')
            ->andWhere('n.workspace = :workspace')
            ->andWhere('n.movedTo IS NULL OR n.removed = :removed')
            ->setParameter('nodeType', $nodeType)
            ->setParameter('workspace', $workspaceName)
            ->setParameter('removed', false, \PDO::PARAM_BOOL);
        return $queryBuilder->getQuery()->getResult();
    }
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;
    }
551635
public function setNodeType($nodeType)
    {
        if (is_string($nodeType)) {
            $nodeType = $this->nodeTypeManager->getNodeType($nodeType);
        }

        if (!$nodeType instanceof NodeType) {
            throw new \InvalidArgumentException('nodeType needs to be of type string or NodeType', 1452100970);
        }

        $this->nodeType = $nodeType;
    }
1099225
public function setNodeType(NodeType $nodeType): void
    {
        if ($this->getNodeType() === $nodeType) {
            return;
        }
        if (!$this->isNodeDataMatchingContext()) {
            $this->materializeNodeData();
        }
        $this->nodeData->setNodeType($nodeType);

        $this->context->getFirstLevelNodeCache()->flush();
        $this->emitNodeUpdated($this);
    }
42072
private function createDsn(string $dbtype, \stdClass $params): string
	{
		$pairs = [];

		if ( ! empty($params->database))
		{
			$pairs[] = implode('=', ['dbname', $params->database]);
		}

		$skip = [
			'name' => 'name',
			'pass' => 'pass',
			'user' => 'user',
			'type' => 'type',
			'prefix' => 'prefix',
			'options' => 'options',
			'database' => 'database',
			'alias' => 'alias'
		];

		foreach($params as $key => $val)
		{
			if (( ! array_key_exists($key, $skip)) &&  ! empty($val))
			{
				$pairs[] = implode('=', [$key, $val]);
			}
		}

		return strtolower($dbtype) . ':' . implode(';', $pairs);
	}
794376
public function isOfType(NodeInterface $node, string $nodeType): bool
    {
        return $node->getNodeType()->isOfType($nodeType);
    }
808710
public function isOfType($nodeType)
    {
        if ($nodeType === $this->name) {
            return true;
        }
        if (array_key_exists($nodeType, $this->declaredSuperTypes) && $this->declaredSuperTypes[$nodeType] === null) {
            return false;
        }
        foreach ($this->declaredSuperTypes as $superType) {
            if ($superType !== null && $superType->isOfType($nodeType) === true) {
                return true;
            }
        }
        return false;
    }
296989
public function hasDoctrineTypeMappingFor($dbType)
    {
        if ($this->doctrineTypeMapping === null) {
            $this->initializeAllDoctrineTypeMappings();
        }

        $dbType = strtolower($dbType);

        return isset($this->doctrineTypeMapping[$dbType]);
    }
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();
    }
1292969
public function getGeomFromText($databasetype)
    {
        $wkt = "";
        switch(strtoupper($databasetype))
        {
            case SrsPoint::$POSTGIS:
                $wkt = "ST_GEOMFROMTEXT('POINT(" . $this->lon . " " . $this->lat . ")'," . $this->srs . ")";
                break;

            default:
                break;
        }
        return $wkt;
    }
660823
public function getInheritSort($nodeId)
    {
        if (isset($this->attributes['inheritSort'][$nodeId])) {
            return $this->attributes['inheritSort'][$nodeId];
        }

        return $this->sort;
    }
453849
protected function extractType($dbType)
	{
		if(strpos($dbType,'[')!==false || strpos($dbType,'char')!==false || strpos($dbType,'text')!==false)
			$this->type='string';
		elseif(strpos($dbType,'bool')!==false)
			$this->type='boolean';
		elseif(preg_match('/(real|float|double)/',$dbType))
			$this->type='double';
		elseif(preg_match('/(integer|oid|serial|smallint)/',$dbType))
			$this->type='integer';
		else
			$this->type='string';
	}