Set custom alias for

@param int $nodeId
@param int $siteId
@param string $siteId
960410
public function setCustomAlias($nodeId, $siteId, $alias)
    {
        $this
            ->database
            ->merge('ucms_seo_route')
            ->key([
                'node_id' => $nodeId,
                'site_id' => $siteId,
            ])
            ->fields([
                'route'        => $alias,
                'is_protected' => 1,
                'is_outdated'  => 0,
            ])
            ->execute()
        ;
    }
1361655
public function getPathAlias($nodeId, $siteId)
    {
        $route = $this
            ->database
            ->query(
                "SELECT route, is_outdated FROM {ucms_seo_route} WHERE node_id = :node AND site_id = :site",
                [':node' => $nodeId, ':site' => $siteId]
            )
            ->fetch()
        ;

        if (!$route || $route->is_outdated) {
            return $this->computeAndStorePathAlias($nodeId, $siteId, ($route ? $route->route : null));
        } else {
            return $route->route;
        }
    }
1290501
public function init($siteId = '', $force = false)
    {
        $siteId = !empty($siteId) ? $siteId : $this->payload->getSiteId();
        $hasUserId = $this->cookie->getCookie(CookieNames::USER_ID);
        $hasUserId = !empty($hasUserId);

        //store siteId on cookies
        $this->cookie->setCookie(CookieNames::SITE_ID, $siteId);

        //store campaignId on cookies
        $this->storeCampaignIdIfExists();
        if (!$hasUserId || $force) {
            $newUserId = $this->replace_dashes(Uuid::v4());
            $this->cookie->setCookie(CookieNames::USER_ID, $newUserId, time() + 60 * 60 * 24 * 3650);
            return;
        }
    }
55213
public function buildPagesResourceId(
        $siteId
    ) {
        return $this->resourceName->get(
            ResourceName::RESOURCE_SITES,
            $siteId,
            ResourceName::RESOURCE_PAGES
        );
    }
845488
public function updateSite($serverId, $siteId, array $data)
    {
        return new Site(
            $this->put("servers/$serverId/sites/$siteId", $data)['site']
            + ['server_id' => $serverId], $this
        );
    }
773233
protected function _createTreeManager( $siteid )
	{
		if( !isset( $this->_treeManagers[$siteid] ) )
		{
			$context = $this->_getContext();
			$config = $context->getConfig();
			$dbm = $context->getDatabaseManager();


			$treeConfig = array(
				'search' => $this->_searchConfig,
				'dbname' => $this->_getResourceName(),
				'sql' => array(
					'delete' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/delete' ) ),
					'get' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/get' ) ),
					'insert' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/insert' ) ),
					'move-left' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-left' ) ),
					'move-right' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/move-right' ) ),
					'search' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/search' ) ),
					'update' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update' ) ),
					'update-parentid' => str_replace( ':siteid', $siteid, $config->get( 'mshop/catalog/manager/default/item/update-parentid' ) ),
					'newid' => $config->get( 'mshop/catalog/manager/default/item/newid' ),
				),
			);

			$this->_treeManagers[$siteid] = MW_Tree_Factory::createManager( 'DBNestedSet', $treeConfig, $dbm );
		}

		return $this->_treeManagers[$siteid];
	}
487512
public function generatePerimeter($siteId)
    {
        $treeNodes = $this->nodeRepository->findTreeNode(
            $siteId,
            $this->contextManager->getSiteContributionLanguage(),
            NodeInterface::ROOT_PARENT_ID
        );

        return $this->generateTreePerimeter($treeNodes);
    }
1010581
public function getRedirectList($siteId)
    {
        try {
            $result = $this->getQuery($siteId)->getResult();
        } catch (NoResultException $e) {
            $result = [];
        }

        return $result;
    }
750759
public function updateNodeSection( $nodeID, $sectionID )
    {
        $contentObject = eZContentObject::fetchByNodeID( $nodeID );
        eZContentOperationCollection::registerSearchObject( $contentObject->attribute( 'id' ) );
    }
836700
public function hydrateNodeFromNodeId(NodeInterface $node, $nodeId)
    {
        $siteId = $this->contextManager->getSiteId();
        $oldNode = $this->nodeRepository->findInLastVersion($nodeId, $node->getLanguage(), $siteId);
        if ($oldNode) {
            $node->setTemplate($oldNode->getTemplate());
            $this->duplicateArea($oldNode, $node);
        }

        return $node;
    }
1113163
public function removeNode($nodeId)
    {
        if (isset($this->nodeSet[$nodeId]))
            unset($this->nodeSet[$nodeId]);
        return true;
    }
1135052
private function applyNamedTids(Siteroot $siteroot, array $data)
    {
        if (!array_key_exists('specialtids', $data)) {
            // noting to save
            return $this;
        }

        $specialTidsData = $data['specialtids'];

        $specialTids = [];
        foreach ($specialTidsData as $row) {
            $row['language'] = !empty($row['language']) ? $row['language'] : '';

            $specialTids[$row['key'].'__'.$row['language']] = [
                'name' => $row['key'],
                'language' => $row['language'] ?: null,
                'treeId' => $row['tid'],
            ];
        }
        $siteroot->setSpecialTids(array_values($specialTids));

        return $this;
    }
911504
public function getSiteDetails($siteId)
    {
        if ($this->connector->getURL() === null) {
            return 'Cannot find site URL from configuration.';
        }
        $url = $this->connector->getURL().self::VERSION.$siteId;
        $params = [];
        $response = $this->connector->connecting($url, $params, 'GET');

        return $response;
    }
693517
public function setInheritSort($nodeId, $sort)
    {
        if (!isset($this->attributes['inheritSort'])) {
            $this->attributes['inheritSort'] = [];
        }

        $this->attributes['inheritSort'][$nodeId] = $sort;

        return $this;
    }
744652
protected function tagResponse(ReadBlockInterface $block, $nodeId, $siteId, $language)
    {
        $tagManager = $this->get('open_orchestra_base.manager.tag');

        $cacheTags = $this->get('open_orchestra_display.display_block_manager')->getCacheTags($block);

        if (true === $block->isTransverse()) {
            $cacheTags[] = $tagManager->formatNodeIdTag($nodeId);
        }

        $cacheTags[] = $tagManager->formatSiteIdTag($siteId);
        $cacheTags[] = $tagManager->formatLanguageTag($language);

        $this->get('open_orchestra_display.manager.cacheable')->addCacheTags($cacheTags);
    }
700672
public function cleanup( array $siteids )
	{
		$context = $this->_getContext();
		$config = $context->getConfig();
		$search = $this->createSearch();

		$path = 'classes/catalog/manager/submanagers';
		foreach( $config->get( $path, array( 'list' ) ) as $domain ) {
			$this->getSubManager( $domain )->cleanup( $siteids );
		}

		$dbm = $context->getDatabaseManager();
		$dbname = $this->_getResourceName();
		$conn = $dbm->acquire( $dbname );

		try
		{
			$path = 'mshop/catalog/manager/default/item/delete';
			$sql = $config->get( $path, $path );

			$types = array( 'siteid' => MW_DB_Statement_Abstract::PARAM_STR );
			$translations = array( 'siteid' => '"siteid"' );

			$search->setConditions( $search->compare( '==', 'siteid', $siteids ) );
			$sql = str_replace( ':siteid', $search->getConditionString( $types, $translations ), $sql );

			$stmt = $conn->create( $sql );
			$stmt->bind( 1, 0, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, 0x7FFFFFFF, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$dbm->release( $conn, $dbname );
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}
	}
853246
public function certificates($serverId, $siteId)
    {
        return $this->transformCollection(
            $this->get("servers/$serverId/sites/$siteId/certificates")['certificates'],
            Certificate::class,
            ['server_id' => $serverId, 'site_id' => $siteId]
        );
    }