Returns URL to view the tag

@param int $exclusivemode
@param int $fromctx context id where this tag cloud is displayed
@param int $ctx context id for tag view link
@param int $rec recursive argument for tag view link
@return \moodle_url
423099
public function get_view_url($exclusivemode = 0, $fromctx = 0, $ctx = 0, $rec = 1) {
        return static::make_url($this->record->tagcollid, $this->record->rawname,
            $exclusivemode, $fromctx, $ctx, $rec);
    }
51478
public function getReturnUrl($deliveryExecutionUri = '')
    {

        $ext = ($this->hasOption(self::EXTENSION_OPTION))? $this->getOption(self::EXTENSION_OPTION) : 'taoDelivery';

        $ctrl = ($this->hasOption(self::CONTROLLER_OPTION))? $this->getOption(self::CONTROLLER_OPTION) : 'DeliveryServer';

        $method = ($this->hasOption(self::METHOD_OPTION))? $this->getOption(self::METHOD_OPTION) : 'index';


        return _url($method, $ctrl, $ext);
    }
1257525
private function iptc_maketag($rec, $dat, $val)
		# Author:   Thies C. Arntzen
		# Purpose:    Function to format the new IPTC text
		# Param in:   $rec: Application record. (We’re working with #2)
		#       $dat: Index. (120 for caption, 118 for contact. See the IPTC IIM
		#         specification:
		#         http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf
		#       $val: Value/data/text. Make sure this is within the length
		#         constraints of the IPTC IIM specification
		# Ref:      http://blog.peterhaza.no/working-with-image-meta-data-in-exif-and-iptc-headers-from-php/
		#       http://php.net/manual/en/function.iptcembed.php
		#
	{
		$len = strlen($val);
		if ($len < 0x8000)
		{
			return chr(0x1c) . chr($rec) . chr($dat) .
			chr($len >> 8) .
			chr($len & 0xff) .
			$val;
		}
		else
		{
			return chr(0x1c) . chr($rec) . chr($dat) .
			chr(0x80) . chr(0x04) .
			chr(($len >> 24) & 0xff) .
			chr(($len >> 16) & 0xff) .
			chr(($len >> 8) & 0xff) .
			chr(($len) & 0xff) .
			$val;
		}
	}
1195873
public static function get_collections_menu($unlockedonly = false, $onlysearchable = false,
            $selectalllabel = null) {
        $tagcolls = self::get_collections($onlysearchable);
        $options = array();
        foreach ($tagcolls as $id => $tagcoll) {
            if (!$unlockedonly || empty($tagcoll->component)) {
                $options[$id] = self::display_name($tagcoll);
            }
        }
        if (count($options) > 1 && $selectalllabel) {
            $options = array(0 => $selectalllabel) + $options;
        }
        return $options;
    }
918369
protected function getResponseModeAjax($sRedirectURL = null)
    {
        $this->sendFlashMessage();

        if (!Result::status()) {
            return Result::get();
        }

        $bRedirectOn = $this->property(self::PROPERTY_REDIRECT_ON);
        $sRedirectPage = $this->property(self::PROPERTY_REDIRECT_PAGE);
        if (!$bRedirectOn) {
            return Result::get();
        }

        if (!empty($sRedirectURL)) {
            return Redirect::to($sRedirectURL);
        }

        if (empty($sRedirectPage)) {
            return Redirect::to('/');
        }

        $sRedirectURL = Page::url($sRedirectPage, $this->getRedirectPageProperties());

        return Redirect::to($sRedirectURL);
    }
776739
public function getNodeIconURL()
    {
        $sURL = null;
        /** @var $oNode TdbShopCategory */
        $oNode = $this->getNodeCopy();
        $oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed());
        if ($oImage) {
            $sURL = $oImage->GetRelativeURL();
            $this->sNavigationIconId = $oImage->id;
        }

        return $sURL;
    }
1326696
protected function getPreviewLink($scheme, $alias, $encryptedId, $aliasId)
    {
        $previewLink = array(
            'name' => $alias->getDomain(),
            'link' => ''
        );

        if (is_null($scheme) || SchemeableInterface::SCHEME_DEFAULT == $scheme) {
            $scheme = $alias->getScheme();
        }
        $domain = $scheme . '://' . $alias->getDomain();
        $routeName = 'open_orchestra_base_node_preview';
        $parameters = array(
            'token' => $encryptedId,
            'aliasId' => $aliasId
        );

        $previewLink['link'] = $domain . $this->generateRoute($routeName, $parameters, UrlGeneratorInterface::ABSOLUTE_PATH);

        return $this->getContext()->transform('link', $previewLink);
    }
996914
protected function getPaginatedBitmaps($zoomFactor , $format , $from , $to)
    {
        if ( $from > $to ) {
            throw new InvalidException('Start page for bitmaps must be inferior to end page');
        }

        $ret = array();
        try {
            $result = $this->getSoapClient()->GetBitmaps(array(
                'fromPage'   => ( integer ) $from ,
                'toPage'     => ( integer ) $to ,
                'zoomFactor' => ( integer ) $zoomFactor ,
                'format'     => ( string ) $format ,
            ));
        } catch ( SoapException $ex ) {
            throw new BitmapsException('Error while retrieving the final document as paginated bitmaps from Livedocx service' , $ex);
        }
        if ( isset($result->GetBitmapsResult->string) ) {
            $pageCounter = ( integer ) $from;
            if ( is_array($result->GetBitmapsResult->string) ) {
                foreach ( $result->GetBitmapsResult->string as $string ) {
                    $ret[ $pageCounter ] = base64_decode($string);
                    $pageCounter ++;
                }
            } else {
                $ret[ $pageCounter ] = base64_decode($result->GetBitmapsResult->string);
            }
        }

        return $ret;
    }
468023
public static function slimText($strText, $intLength = null, $allowedTags = '<p><br><br/>')
    {
        $strText = strip_tags($strText, $allowedTags);

        if ($intLength !== null) {
            $strText = static::truncateHtml($strText, $intLength);
        }

        $strText = str_replace(['[-]', '&shy;', '[nbsp]', '&nbsp;'], ['', '', ' ', ' '], $strText);

        return $strText;
    }
602567
public function get_context_url(\core_search\document $doc) {
        $contextmodule = \context::instance_by_id($doc->get('contextid'));
        return new \moodle_url('/mod/forum/view.php', array('id' => $contextmodule->instanceid));
    }
1247371
protected function _findTagIndex(array $tokens, $from, $to, $tagType) {
		for ($i = $from + 1; $i < $to; $i++) {
			if ($tokens[$i]['code'] === $tagType) {
				return $i;
			}
		}

		return null;
	}
1081270
public static function get_tags_returns() {
        return new external_single_structure(
            array(
                'tags' => new external_multiple_structure( new external_single_structure(
                    array(
                        'id' => new external_value(PARAM_INT, 'tag id'),
                        'tagcollid' => new external_value(PARAM_INT, 'tag collection id'),
                        'name' => new external_value(PARAM_TAG, 'name'),
                        'rawname' => new external_value(PARAM_RAW, 'tag raw name (may contain capital letters)'),
                        'description' => new external_value(PARAM_RAW, 'tag description'),
                        'descriptionformat' => new external_format_value(PARAM_INT, 'tag description format'),
                        'flag' => new external_value(PARAM_INT, 'flag', VALUE_OPTIONAL),
                        'official' => new external_value(PARAM_INT,
                            'whether this flag is standard (deprecated, use isstandard)', VALUE_OPTIONAL),
                        'isstandard' => new external_value(PARAM_INT, 'whether this flag is standard', VALUE_OPTIONAL),
                        'viewurl' => new external_value(PARAM_URL, 'URL to view'),
                    ), 'information about one tag')
                ),
                'warnings' => new external_warnings()
            )
        );
    }
154777
private function get_display_mode_selector_html(int $displaymode) : string {
        $baseurl = $this->baseurl;
        $select = new single_select(
            $baseurl,
            'mode',
            forum_get_layout_modes(),
            $displaymode,
            null,
            'mode'
        );
        $select->set_label(get_string('displaymode', 'forum'), ['class' => 'accesshide']);

        return $this->renderer->render($select);
    }
319774
@Trivial
    @FFDCIgnore(NamingException.class)
    private String getProviderURL(TimedDirContext ctx) {
        try {
            return (String) ctx.getEnvironment().get(Context.PROVIDER_URL);
        } catch (NamingException e) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "getProviderURL", e.toString(true));
            }
            return "(null)";
        }
    }
237954
private function getUrl($string, $from, $to, $key)
    {
        return sprintf(
            'https://www.googleapis.com/language/translate/v2?key=%s&source=%s&target=%s&q=%s',
            $key,
            $from,
            $to,
            urlencode($string)
        );
    }
1016431
public function get_pin_discussion_url_from_discussion(discussion_entity $discussion) : moodle_url {
        return new moodle_url('discuss.php', [
            'sesskey' => sesskey(),
            'd' => $discussion->get_id(),
            'pin' => $discussion->is_pinned() ? FORUM_DISCUSSION_UNPINNED : FORUM_DISCUSSION_PINNED
        ]);
    }
29264
public static function getSection($extension, $perspectiveId, $sectionId)
    {
        $returnValue = null;

        $structure = self::getPerspective($extension, $perspectiveId);
        foreach ($structure->getChildren() as $section) {
            if ($section->getId() == $sectionId) {
                $returnValue = $section;
                break;
            }
        }
		if (empty($returnValue)) {
			\common_logger::w('Section '.$sectionId.' not found found for perspective '.$perspectiveId);
    	}

        return $returnValue;
    }