/** * Link a string to some page. * Like pi_getPageLink() but takes a string as first parameter which will in turn be wrapped with the URL including target attribute * Simple example: $this->pi_linkToPage('My link', 123) to get something like <a href="index.php?id=123&type=1">My link</a> (or <a href="123.1.html">My link</a> if simulateStaticDocuments is set) * * @param string The content string to wrap in <a> tags * @param integer Page id * @param string Target value to use. Affects the &type-value of the URL, defaults to current. * @param array Additional URL parameters to set (key/value pairs) * @return string The input string wrapped in <a> tags with the URL and target set. * @see pi_getPageLink(), tslib_cObj::getTypoLink() */ function pi_linkToPage($str, $id, $target = '', $urlParameters = array()) { return $this->cObj->getTypoLink($str, $id, $urlParameters, $target); // ?$target:$GLOBALS['TSFE']->sPre }