mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 11:00:40 +08:00
git-subtree-dir: public/legacy git-subtree-split: 817a12dc0c30c189f56d5cb1f7dc37a9631bdbe3
36 lines
846 B
PHP
36 lines
846 B
PHP
<?php
|
|
|
|
/**
|
|
* Smarty plugin
|
|
* @package Smarty
|
|
* @subpackage plugins
|
|
*/
|
|
|
|
/**
|
|
* Smarty {convert_link} function plugin
|
|
*
|
|
* Smarty plugin
|
|
* -------------------------------------------------------------
|
|
* File: function.convert_link.php
|
|
* Type: function<br>
|
|
* Name: convert_link<br>
|
|
* Purpose: convert link to new UI link introduced in 8.0
|
|
* -------------------------------------------------------------
|
|
* @param $params array - its structure is
|
|
* 'link' => link to convert
|
|
* @param $smarty
|
|
* @param Smarty
|
|
* @return string
|
|
*/
|
|
function smarty_function_convert_link($params, &$smarty)
|
|
{
|
|
if (empty($params['link'])) {
|
|
return '';
|
|
}
|
|
|
|
require_once 'include/portability/RouteConverter.php';
|
|
$routeConverter = new RouteConverter();
|
|
|
|
return $routeConverter->generateUiLink($params['link']);
|
|
}
|
|
?>
|