improve link building (QUERY_STRING and PATH_INFO are now allowed)
[GitHub/Stricted/Domain-Control-Panel.git] / lib / system / template / plugins / block.link.php
1 <?php
2 use dns\system\RequestHandler;
3
4 function smarty_block_link($params, $content, $template, &$repeat) {
5 if ($repeat) {
6 return;
7 }
8
9 if (!array_key_exists('controller', $params)) {
10 $params['controller'] = null;
11 }
12
13 if (!array_key_exists('id', $params)) {
14 $params['id'] = null;
15 }
16
17 if (!array_key_exists('title', $params)) {
18 $params['title'] = null;
19 }
20
21 return RequestHandler::getInstance()->getLink($params, $content);
22 }