@param null|string $link

@return mixed
420646
public function getLink($link)
    {
        if (isset($this->links->$link->redirectHref)) {
            return $this->links->$link->redirectHref;
        }

        if (isset($this->links->$link->href)) {
            return $this->links->$link->href;
        }

        return $this->links->$link;
    }
1209803
public function seeLink($link)
    {
        $this->ensurejQueryIsAvailable();

        $selector = addslashes(trim($this->resolver->format("a:contains('{$link}')")));

        $script = <<<JS
            var link = jQuery.find("{$selector}");
            return link.length > 0 && jQuery(link).is(':visible');
JS;

        return $this->driver->executeScript($script);
    }
353235
public function all(Link $link = null)
    {
        $data = $this->createData(array(
            'api_token' => $this->apiToken,
        ), $link);

        $this->send('yoall/', InternalRequestInterface::METHOD_POST, $data);
    }
179217
public function GetNamedLink($name, $link, $target = null)
    {
        $result = '';
        if (strlen($name) != 0) {
            $result = $name;
            if (strlen($link) != 0) {
                $result = "<a href=\"".$link."\"".(is_null($target) ? "" : " target=\"".$target."\"").">".$result."</a>";
            }
        }
        return $result;
    }
6932
public function isLinkAllowed(string $link): bool
	{
		$this->prepareLink($link);
		return $this->links[$link]->allowed;
	}
903277
public function cleanLink($link)
	{
		$link = strtolower(preg_replace(
					array('#[\\s-]+#', '#[^A-Za-z0-9/ -]+#'),
					array('-', ''),
				    $this->cleanString(urldecode($link))
		));

		$link = preg_replace('/\/+/', '/', $link);
		$link = preg_replace('/-+/', '-', $link);
		
		return $link;
	}
184460
public static function parseParameters($link)
    {
        $pos = strpos($link, '?');
        if ($pos !== null) {
            $link = substr($link, $pos + 1);
        }

        $params = [];
        parse_str($link, $params);

        return $params;
    }
1232104
public static function label($link) {
        if(isset($link['label']) && !empty(trim($link['label']))) {
            return trim($link['label']);
        }
        elseif(isset($link['title']) && !empty(trim($link['title']))) {
            return trim($link['title']);
        }
        return false;
    }
422011
protected function link($link, $anchor = "") {
        $link = trim($link);
        if (preg_match("/^(https?|s?ftp):\/\/.+$/i", $link)) {
            $link = trim($link, ",.?!");
            return array('content' => $link, 'url' => $link);
        } else {
            $callbackargs = $this->linkgeneratorcallbackargs;
            $callbackargs['anchor'] = $anchor;
            $link = call_user_func_array($this->linkgeneratorcallback, array($link, $callbackargs));

            if (isset($link['link_info'])) {
                $l = $link['link_info']['link'];
                unset($link['link_info']['link']);
                $this->returnvalues['link_count'][$l] = $link['link_info'];
            }
            return $link;
        }
    }
921413
public static function toString($args, $link  = '') {
		$str = '';
		if (is_array($args)) {
			foreach ($args as $value) {
				$str .= self::toString($value, $link);
			}
		} else {
			$str .= $args.$link;
		}
		return $str;
	}
937170
public function setLink($link)
    {
        if (strlen($link) == 0) {
            throw new \InvalidArgumentException(sprintf('TextInput link should not be empty'));
        }

        if (!preg_match('@^https?://@', $link)) {
            throw new \InvalidArgumentException(sprintf('Invalid url: %s', $link));
        }

        $this->link = $link;

        return $this;
    }
1026317
public function getLink($iLang = null)
    {
        if ($oRecomm = $this->getActiveRecommList()) {
            $sLink = $oRecomm->getLink($iLang);
        } else {
            $sLink = \OxidEsales\Eshop\Application\Controller\FrontendController::getLink($iLang);
        }
        $sSearch = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('searchrecomm');
        if ($sSearch) {
            $sLink .= ((strpos($sLink, '?') === false) ? '?' : '&amp;') . "searchrecomm={$sSearch}";
        }

        return $sLink;
    }
575071
public function Link($action = null)
    {
        // Forms without parent controller have no link;
        // E.g. Submission handled via graphql
        $controller = $this->form->getController();
        if (empty($controller)) {
            return null;
        }

        // Respect FormObjectLink() method
        if ($controller->hasMethod("FormObjectLink")) {
            $base = $controller->FormObjectLink($this->form->getName());
        } else {
            $base = Controller::join_links($controller->Link(), $this->form->getName());
        }

        // Join with action and decorate
        $link = Controller::join_links($base, $action, '/');
        $this->extend('updateLink', $link, $action);
        return $link;
    }
81240
public function getLink($rel)
    {
        foreach ($this->getLinks() as $link) {
            if (isset($link['rel']) && $link['rel'] == $rel) {
                return $link;
            }
        }

        return null;
    }
142463
public function activeLink($link)
    {
        $pathinfo = $this->getPathInfo();
        if (($pathinfo and '/' . $pathinfo === $link) or (!$pathinfo and $link === '/')) {
            return ' active'; //the white space is nedded
        }

        return '';
    }
913283
protected function createLink(string $link = null): string
	{
		$this->prepareLink($link);

		if ($this instanceof Link) {
			$link = Strings::firstUpper($this->name) . ':' . $link;
		}
		if ($this->namespace !== null) {
			$link = Strings::firstUpper($this->namespace) . ':' . $link;
		}

		$parent = $this->parent;
		if ($parent instanceof Menu) {
			return ':' . $link;
		} elseif ($parent instanceof Item) {
			return $parent->createLink($link);
		}
		throw new InvalidStateException();
	}
338992
protected function composeListLink($link)
    {
        $query = $this->addIdToQuery();
        $query = $this->addPaginationToQuery($query);

        $link .= '?' . http_build_query($query);

        return $link;
    }