Returns URL of a promo block page.

@param string $sPageCode

@return string
11405
public function getPageUrl($sPageCode = 'promo-block')
    {
        //Get URL params
        $arParamList = $this->getPageParamList($sPageCode);

        //Generate page URL
        $sURL = CmsPage::url($sPageCode, $arParamList);

        return $sURL;
    }
267198
protected static function getCategoryPageUrl($pageCode, $category, $theme)
    {
        $page = CmsPage::loadCached($theme, $pageCode);
        if (!$page) {
            return;
        }

        $properties = $page->getComponentProperties('blogPosts');
        if (!isset($properties['categoryFilter'])) {
            return;
        }

        /*
         * Extract the routing parameter name from the category filter
         * eg: {{ :someRouteParam }}
         */
        if (!preg_match('/^\{\{([^\}]+)\}\}$/', $properties['categoryFilter'], $matches)) {
            return;
        }

        $paramName = substr(trim($matches[1]), 1);
        $url = CmsPage::url($page->getBaseFileName(), [$paramName => $category->slug]);

        return $url;
    }
325090
public function getPromotion($code, $id = null)
    {
        $this->_requireIdentifier($code, $id);
        return new CheddarGetter_Response(
                                                                                    $this->request('/promotions/get' . (($id) ? '/id/'.$id : '/code/' . urlencode($code)))
                                                                                );
    }
587050
public function getEmbedURL($encode = true)
    {
        $url = '';

        // PROTOCOL
        if ($this->getHTTPS()) {
            $url .= 'https://';
        } else {
            $url .= 'http://';
        }

        // DOMAIN
        if ($this->getCookies()) {
            $url .= 'www.youtube.com';
        } else {
            $url .= 'www.youtube-nocookie.com';
        }

        // PATH
        if ($this->isVideo()) {
            $url .= '/v/';
        } else {
            $url .= '/p/';
        }

        // ID
        if ($this->isVideo()) {
            $url .= $this->getID();
        } else {
            $url .= substr($this->getID(), 2);
        } // Playlists start with PL but YouTube doesn't want that

        // Build Query String
        $query = [];
        $query['version'] = 2;
        if ($this->getAutoplay()) {
            $query['autoplay'] = 1;
        }
        if ($this->getLoop()) {
            $query['loop'] = 1;
        }
        if ($this->getJSAPI()) {
            $query['enablejsapi'] = 1;
        }
        if ($this->isHD()) {
            $query['hd'] = 1;
        }
        $query['theme'] = $this->getTheme();

        $seperator = $encode ? '&amp;' : '&';
        $url .= '?'.http_build_query($query, $seperator);

        return $url;
    }
705670
protected function getUrl(BlockInterface $block)
    {
        if (substr($block->getValue(), 0, 4) == 'http') {
            return $block->getValue();
        }

        return $this->generateUrl($block);
    }
1212032
public function getCity($code): string
    {
        $provinceCode = substr($code, 0, 2) . '0000';
        $cityCode = substr($code, 0, 4) . '00';
        if ($provinceCode != $cityCode) {
            return $this->get($cityCode);
        }

        return '';
    }
670754
public function getNextRecordCode($code = null)
    {
        if (is_null($code)) {
            $code = $this->getMyKey();
        }
        $crID = null;
        if (is_string($code)) {
            $sro = $this->performRequest($this->evidence.'/(kod=\''.$code.'\').json');
            if (count($sro[$this->evidence])) {
                $crID = current(current($sro[$this->evidence]));
            }
        } else {
            $crID = $code;
        }

        $cr                = $this->performRequest($this->evidence.'/'.$crID.'.json');
        $radaPokladniPohyb = current($cr[$this->evidence]);
        $crInfo            = end($radaPokladniPohyb['polozkyRady']);

        $cislo = $crInfo['cisAkt'] + 1;
        if ($crInfo['zobrazNuly'] == 'true') {
            return $crInfo['prefix'].sprintf('%\'.0'.$crInfo['cisDelka'].'d',
                    $cislo).'/'.date('y');
        } else {
            return $crInfo['prefix'].$cislo.'/'.date('y');
        }
    }
1125762
public function getUrlParamList($sPageCode, $sComponentName, $sParamName = 'slug')
    {
        $sCacheKey = implode('_', [$sPageCode, $sComponentName, $sParamName]);
        if ($this->hasCache($sCacheKey)) {
            return $this->getCachedData($sCacheKey);
        }

        $arResult = [];
        if (empty($sPageCode) || empty($sComponentName) || empty($sParamName)) {
            return $arResult;
        }

        //Get component list
        $arComponentList = $this->getFullComponentList($sPageCode);
        if (empty($arComponentList)) {
            return $arResult;
        }

        foreach ($arComponentList as $sKey => $arPropertyList) {
            if (!preg_match('%^'.$sComponentName.'%', $sKey)) {
                continue;
            }

            if (empty($arPropertyList) || !isset($arPropertyList[$sParamName])) {
                continue;
            }

            /*
             * Extract the routing parameter name
             * eg: {{ :someRouteParam }}
             */
            if (!preg_match('/^\{\{([^\}]+)\}\}$/', $arPropertyList['slug'], $arMatches)) {
                continue;
            }

            $sValue = trim($arMatches[1]);
            $sValue = ltrim($sValue, ':');
            $arResult[] = $sValue;
        }

        $this->setCachedData($sCacheKey, $arResult);

        return $arResult;
    }
881167
public function buildBlock($code)
    {
        $lines = $this->parser->splitIntoLines($code);
        $result = [];

        foreach (array_filter($lines) as $line)
        {
            $result[] = $this->printer->toString(
                eval ("return {$line};")
            );
        }

        return sprintf(
            "```php\n%s```\n```\n%s\n```\n",
            implode("\n", $lines),
            implode("\n", $result)
        );
    }
1132623
function encode($barcode) {
	$encoded = $this->makeEncoding();
        $W = 0;
        $H = 0;
        $grid = "";
        $binary = array_fill(0, 4096, 0);
        $matrix = $this->makeEncoding();
        $encoding = $this->encodingList(strlen($barcode), $barcode, false);

        $encoded['valid'] = false;

        if (!$encoding) // there's nothing to encode ...
            return $encoded;

        //$this->debug("encoding: " . $encoding);
        //$this->debug("encodingLength: " . $encoding['encodingLength']);
        for ($i = 0; $i < count($this->Encodings); $i++) {
            $matrix = $this->Encodings[$i];
            if ($matrix['bytes'] > $encoding['encodingLength'])
                break;
        }

        if ($matrix['width'] == 0) {
            die("Cannot find suitable size, url is too long!");
            return $encoded;
        }

        $W = $matrix['width'];
        $H = $matrix['height'];

        if ($this->ecc200encode($binary, $matrix['bytes'], $barcode, strlen($barcode), $encoding) == 0) {
            die("URL too long for " + $W + "x" + $H);
            return $encoded;
        }

        // add error checking using ReedSolomon
        $this->rs($binary, $matrix['bytes'], $matrix['datablocks'], $matrix['rsblocks']);


        // block $placement
        {
            $NC = $W - 2 * floor($W / $matrix['fw']);
            $NR = $H - 2 * floor($H / $matrix['data']);
            $places = array_fill(0, $NC * $NR, 0);
            $this->place($places, $NR, $NC);
            $grid = array_fill(0, $W * $H, 0);
            for ($y = 0; $y < $H; $y += $matrix['data']) {
                for ($x = 0; $x < $W; $x++)
                    $grid[$y * $W + $x] = 1;
                for ($x = 0; $x < $W; $x += 2)
                    $grid[($y + $matrix['data'] - 1) * $W + $x] = 1;
            }
            for ($x = 0; $x < $W; $x += $matrix['fw']) {
                for ($y = 0; $y < $H; $y++)
                    $grid[$y * $W + $x] = 1;
                for ($y = 0; $y < $H; $y += 2)
                    $grid[$y * $W + $x + $matrix['fw'] - 1] = 1;
            }
            for ($y = 0; $y < $NR; $y++) {
                for ($x = 0; $x < $NC; $x++) {
                    $v = $places[($NR - $y - 1) * $NC + $x];
                    if ($v == 1 || $v > 7 && ($binary[($v >> 3) - 1] & (1 << ($v & 7))))
                        $grid[(1 + $y + 2 * floor($y / ($matrix['data'] - 2))) * $W + 1 + $x + 2 * floor($x / ($matrix['fw'] - 2))] = 1;
                }
            }
        }

        $encoded['width'] = $W;
        $encoded['height'] = $H;
        $encoded['data'] = $grid;
        $encoded['encoding'] = $encoding;
        $encoded['bytes'] = $matrix['bytes'];
        $encoded['ecc'] = floor(($matrix['bytes'] + 2) / $matrix['datablocks']) * $matrix['rsblocks']; //not used?

        return $encoded;
    }
1011557
public function checkCode($code)
    {
        $res = $this->twofactorAdapter->check($code);

        if($res)
        {
            setcookie('twofactorDir-' . $this->dir, $this->cookieCode, 0, "/");
            self::redirect();
        }

        return $res;
    }
191300
function GetCampCode($strMessageIndex) {
        if($this->posnetResponse->koiInfo == null)
            return "";

        if(array_key_exists($strMessageIndex, $this->posnetResponse->koiInfo))
            return $this->posnetResponse->koiInfo[$strMessageIndex]['code'];
        else
            return "";
    }
532901
function getCode()
    {

        $out = $this->getHeaderCode();
        $out .= $this->getFormItemsCode();
        $out .= $this->getFooterCode();

        return $out;
    }
802861
public function get($code = null): string
    {
        if (!$this->validate($code)) {
            throw new \InvalidArgumentException('Invalid code');
        }

        return isset(self::$codes[$code]) ? self::$codes[$code] : '';
    }
287466
public static function getDescription($code)
    {
        if (array_key_exists($code, self::$codes_to_string_map)) {
            return self::$codes_to_string_map[$code];
        } else {
            return false;
        }
    }
530213
public function getAccessToken($code, $grant = 'authorization_code')
    {
        $this->validateCsrf();
        return $this->provider->getAccessToken($grant, ['code' => $code]);
    }
824021
public function getPayPalCancelURL()
    {
        $url = $this->formatUrl($this->_getRedirectUrl());
        $replacedURL = str_replace('showECSPopup=1', 'showECSPopup=0', $url);

        return urlencode($replacedURL);
    }