@see https://shoppartner.dandomain.dk/dokumentation/app-developer/

@param int $appId
@param int $pageType
@return boolean
435260
public function deleteAppScripts(int $appId, int $pageType) : bool
    {
        Assert::that($appId)->greaterThan(0, 'The $appId has to be positive');
        return (bool)$this->master->doRequest(
            'DELETE',
            sprintf(
                '/admin/WEBAPI/Endpoints/v1_0/PluginService/{KEY}/DeleteAppScriptForPage?appId=%s&pageType=%s',
                $appId,
                $pageType
            )
        );
    }
975132
public function init($pageId, array $typoScriptSetup = [])
    {
        $this->setLanguageService($GLOBALS['LANG']);
        $pageId = (strpos($pageId, 'NEW') === 0) ? 0 : (int)$pageId;
        if ((int)$pageId < 0) {
            $pageId = Helper::getInstance()->getPidFromUid($pageId);
        }
        $this->realPid = $pageId;
        $this->loadLayoutSetup($pageId);
        foreach ($this->layoutSetup as $key => $setup) {
            $columns = $this->getLayoutColumns($key);
            if ($columns['allowed'] || $columns['disallowed'] || $columns['maxitems']) {
                $this->layoutSetup[$key]['columns'] = $columns;
                unset($this->layoutSetup[$key]['columns']['allowed']);
                $this->layoutSetup[$key]['allowed'] = $columns['allowed'] ?: [];
                $this->layoutSetup[$key]['disallowed'] = $columns['disallowed'] ?: [];
                $this->layoutSetup[$key]['maxitems'] = $columns['maxitems'] ?: [];
            }
        }
        $this->setTypoScriptSetup($typoScriptSetup);
        return $this;
    }
972569
public function getAllPageIdsAndNamesBySiteThenType($siteId, $type)
    {
        $queryBuilder = $this->_em->createQueryBuilder();

        $queryBuilder->select('page.name, page.pageId')
            ->from(\Rcm\Entity\Page::class, 'page')
            ->join('page.site', 'site')
            ->where('page.pageType = :pageType')
            ->andWhere('site.siteId = :siteId')
            ->setParameter('pageType', $type)
            ->setParameter('siteId', $siteId);

        $result = $queryBuilder->getQuery()->getArrayResult();

        if (empty($result)) {
            return null;
        }

        $return = [];

        foreach ($result as &$page) {
            $return[$page['pageId']] = $page['name'];
        }

        return $return;
    }
610454
public function get($appId, $profileId, array $queryParams)
    {
        $response = $this->api->applications()->profiles()->settings()->get($appId, $profileId, $queryParams);

        return new SettingResponse($response);
    }
411926
protected function hasPage(
        $site,
        $pageName,
        $pageType
    ) {
        return $this->getPageRepo()->sitePageExists(
            $site,
            $pageName,
            $pageType
        );
    }
220903
public function getById($appId, $scanId, array $queryParams = [])
    {
        $response = $this->api->applications()->scans()->getById($appId, $scanId, $queryParams);

        return new ScanResponse($response);
    }
146371
public function sendMiniProgramPage($toUser, $title, $appid, $pagepath, $thumb_media_id)
    {
        $ret = array();
        $ret['touser'] = $toUser;
        $ret['msgtype'] = 'miniprogrampage';
        $ret['miniprogrampage']['title'] = $title;
        $ret['miniprogrampage']['appid'] = $appid;
        $ret['miniprogrampage']['pagepath'] = $pagepath;
        $ret['miniprogrampage']['thumb_media_id'] = $thumb_media_id;
        return $this->send($ret);
    }
734309
public function shouldShowRevisions($siteId, $pageType, $pageName)
    {
        return $this->isAllowedShowRevisions->__invoke(
            GetPsrRequest::invoke(),
            $siteId,
            $pageType,
            $pageName
        );
    }
191907
public function delTicket($type = 'jsapi', $appid = null)
    {
        is_null($appid) && $appid = $this->config->get('appid');
        $cache_name = "{$appid}_ticket_{$type}";
        Tools::delCache($cache_name);
    }
681052
private void doGetDevelopMode() throws PageException {
	Struct sct = new StructImpl();
	pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
	sct.set("developMode", Caster.toBoolean(config.isDevelopMode()));
    }
401943
public static function deletePageTypes($page_id = null)
    {
        if (is_null($page_id)) {
            return false;
        }

        return Symphony::Database()->delete('tbl_pages_types', sprintf(" `page_id` = %d ", $page_id));
    }
402711
public function getApp($appId)
    {
        $url = $this->baseURL . '/' . $appId;
        $ret  = $this->get($url);
        return $ret;
    }
782690
public function getOnlyPageIdByName($siteId, $name, $pageType = PageTypes::NORMAL)
    {
        $queryBuilder = $this->_em->createQueryBuilder();
        $queryBuilder->select('page.pageId')
            ->from(\Rcm\Entity\Page::class, 'page')
            ->where('page.name = :pageName')
            ->andWhere('page.pageType = :pageType')
            ->andWhere('page.site = :siteId')
            ->setParameter('pageName', $name)
            ->setParameter('pageType', $pageType)
            ->setParameter('siteId', $siteId);

        return $queryBuilder->getQuery()->getSingleScalarResult();
    }
1159100
public function getById($appId, $scanId, $libraryId, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->libraries()
            ->getById($appId, $scanId, $libraryId, $queryParams);

        return new LibraryResponse($response);
    }
934992
public function update($pageId)
    {
        // get the root line of the page, every parent page could be a Mount Page source
        /** @var $pageSelect PageRepository */
        $pageSelect = GeneralUtility::makeInstance(PageRepository::class);
        $rootLineArray = $pageSelect->getRootLine($pageId);

        $currentPage = array_shift($rootLineArray);
        $currentPageUid = (int)$currentPage['uid'];

        if (empty($rootLineArray) && $currentPageUid === 0) {
            return;
        }

        /** @var $rootLine Rootline */
        $rootLine = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $rootLineArray);
        $rootLineParentPageIds = array_map('intval', $rootLine->getParentPageIds());
        $destinationMountProperties = $this->pagesRepository->findMountPointPropertiesByPageIdOrByRootLineParentPageIds($currentPageUid, $rootLineParentPageIds);

        if (empty($destinationMountProperties)) {
            return;
        }

        foreach ($destinationMountProperties as $destinationMount) {
            $this->addPageToMountingSiteIndexQueue($pageId, $destinationMount);
        }
    }
1261523
public function getAll($appId, $scanId, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->classes()
            ->getAll($appId, $scanId, $queryParams);

        return new CustomClassesResponse($response);
    }
230842
public function getAll($appId, $scanId, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->libraries()
            ->getAll($appId, $scanId, $queryParams);

        return new LibrariesResponse($response);
    }