Returns all of the URLs for the given $elementType based on the passed in
$criteria and $siteId

@var string|ElementInterface $elementType
@var array                   $criteria
@var int|null                $siteId

@return array
428761
public function getElementUrls($elementType, array $criteria = [], $siteId = null): array
    {
        $devMode = Craft::$app->getConfig()->getGeneral()->devMode;
        $cache = Craft::$app->getCache();

        // Merge in the $criteria passed in
        $criteria = array_merge([
            'siteId' => $siteId,
            'limit'  => null,
        ], $criteria);
        // Set up our cache criteria
        $elementClass = \is_object($elementType) ? \get_class($elementType) : $elementType;
        $cacheKey = $this->getCacheKey($this::ROUTEMAP_ELEMENT_URLS, [$elementClass, $criteria, $siteId]);
        $duration = $devMode ? $this::DEVMODE_ROUTEMAP_CACHE_DURATION : $this::ROUTEMAP_CACHE_DURATION;
        $dependency = new TagDependency([
            'tags' => [
                $this::ROUTEMAP_CACHE_TAG,
            ],
        ]);

        // Just return the data if it's already cached
        $urls = $cache->getOrSet($cacheKey, function () use ($elementClass, $criteria) {
            Craft::info(
                'Route Map cache miss: '.$elementClass,
                __METHOD__
            );
            $resultingUrls = [];

            // Get all of the entries in the section
            $query = $this->getElementQuery($elementClass, $criteria);
            $elements = $query->all();

            // Iterate through the elements and grab their URLs
            foreach ($elements as $element) {
                if ($element instanceof Element
                    && $element->uri !== null
                    && !\in_array($element->uri, $resultingUrls, true)
                ) {
                    $uri = $this->normalizeUri($element->uri);
                    $resultingUrls[] = $uri;
                }
            }

            return $resultingUrls;
        }, $duration, $dependency);

        return $urls;
    }
273721
function site_url($uri = '')
	{
		if ($uri == '')
		{
			return $this->slash_item('base_url').$this->item('index_page');
		}

		if ($this->item('enable_query_strings') == FALSE)
		{
			$suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
			return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix;
		}
		else
		{
			return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri);
		}
	}
560724
protected function getSitePagesResourceId($siteId)
    {
        /** @var ResourceName $resourceName */
        $resourceName = $this->getServiceLocator()->get(
            ResourceName::class
        );

        return $resourceName->get(
            ResourceName::RESOURCE_SITES,
            $siteId,
            ResourceName::RESOURCE_PAGES
        );
    }
444155
public function findAllowedChildren(Elementtype $elementtype)
    {
        $viabilityRepository = $this->entityManager->getRepository('PhlexibleElementtypeBundle:ElementtypeApply');

        return $viabilityRepository->findBy(['underElementtypeId' => $elementtype->getId()]);
    }
331387
public function getAll(array $criteria = [])
    {
        $query = sprintf('%s/snapshots?per_page=%d', $this->endpoint, 200);

        if (isset($criteria['type']) && in_array($criteria['type'], ['droplet', 'volume'])) {
            $query = sprintf('%s&resource_type=%s', $query, $criteria['type']);
        }

        $snapshots = $this->adapter->get($query);

        $snapshots = json_decode($snapshots);

        $this->extractMeta($snapshots);

        return array_map(function ($snapshots) {
            return new SnapshotEntity($snapshots);
        }, $snapshots->snapshots);
    }
784108
public function actionGetSectionUrls(string $section, array $criteria = [], $siteId = null): Response
    {
        return $this->asJson(RouteMap::$plugin->routes->getSectionUrls($section, $criteria, $siteId));
    }
1257342
public function selectTypeAction($siteId = null)
    {
        $contentTypes = $this->get('opifer.content.content_type_manager')->getRepository()->findAll();

        $layouts = $this->get('opifer.content.content_manager')->getRepository()->findBy(['layout' => true]);

        if (!$contentTypes) {
            return $this->redirectToRoute('opifer_content_content_create');
        }

        return $this->render($this->getParameter('opifer_content.content_select_type'), [
            'content_types' => $contentTypes,
            'site_id' => $siteId,
            'layouts' => $layouts
        ]);
    }
1292196
private function loadElementtype($elementtypeId)
    {
        $filename = $this->locator->locate("$elementtypeId.xml", 'elementtypes', true);

        return $this->loadFile($filename);
    }
1157975
public function getEntryPageUrls($idSite, $period, $date, $segment = false, $expanded = false, $idSubtable = false, $flat = false)
    {
        Piwik::checkUserHasViewAccess($idSite);

        $dataTable = $this->getPageUrls($idSite, $period, $date, $segment, $expanded, $idSubtable, false, $flat);
        $this->filterNonEntryActions($dataTable);
        return $dataTable;
    }
869367
public function getSiteUrlsFromId($siteId = null, $format = null)
    {
        $options = $this->getOptions($format)
            ->usePeriod(false);
        if (!is_null($siteId)) {
            $options->setSiteId($siteId);
        }

        return $this->request->send($options);
    }
687767
public function get(
        $root = null,
        $siteId = null,
        $pages = null,
        $pageType = null,
        $pageName = null
    ) {
        if (empty($root)) {
            $root = self::RESOURCE_SITES;
        }

        if (empty($siteId)) {
            return $root;
        }

        if (empty($pages)) {
            return $root . '.' . $siteId;
        }

        if (empty($pageType) || empty($pageName)) {
            return $root . '.' . $siteId . '.' . $pages;
        }

        return $root . '.' . $siteId . '.' . $pages . '.' . $pageType . '.' . $pageName;
    }
132358
protected function getChoices($siteId, $language)
    {
        $orderedNodes = $this->nodeRepository->findTreeNode($siteId, $language, NodeInterface::ROOT_NODE_ID);

        return $this->getHierarchicalChoices($orderedNodes);
    }
44398
public function getCategoryUrls(string $category, array $criteria = [], $siteId = null): array
    {
        return RouteMap::$plugin->routes->getCategoryUrls($category, $criteria, $siteId);
    }
786822
public function allSitePagesAction()
    {
        $entityMgr = $this->getServiceLocator()->get(
            'Doctrine\ORM\EntityManager'
        );
        $currentSite = $this->getServiceLocator()->get(
            \Rcm\Service\CurrentSite::class
        );
        $siteId = $currentSite->getSiteId();

        /** @var Site $site */
        $site = $entityMgr->getRepository(
            Site::class
        )->findOneBy(
            [
                'siteId' => $siteId
            ]
        );

        $pages = $site->getPages();

        $uriFormat = $this->params()->fromQuery('format', null);

        $return = [];

        /** @var Page $page */
        foreach ($pages as $page) {
            $pageName = $page->getName();
            $pageUrl = $this->urlToPage($pageName, $page->getPageType());

            if (!empty($uriFormat)
                && $uriFormat == 'tinyMceLinkList'
            ) {
                $return[] = [
                    'title' => $pageUrl,
                    'value' => $pageUrl
                ];
            } else {
                $return[$pageUrl] = $pageName;
            }
        }
        asort($return);

        return new JsonModel($return);
    }
212487
public function getHybridPages(SiteInterface $site)
    {
        return $this->getEntityManager()->createQueryBuilder()
            ->select('p')
            ->from($this->class, 'p')
            ->where('p.routeName <> :routeName and p.site = :site')
            ->setParameters([
                'routeName' => PageInterface::PAGE_ROUTE_CMS_NAME,
                'site' => $site->getId(),
            ])
            ->getQuery()
            ->execute();
    }
767048
public function actionGetUrlAssetUrls($url, array $assetTypes = ['image'], $siteId = null): Response
    {
        return $this->asJson(RouteMap::$plugin->routes->getUrlAssetUrls($url, $assetTypes, $siteId));
    }
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;
    }