function smarty_function_sorter($params, &$smarty) { $string = $params['text']; $id = $params['id']; $sort = $params['sort']; $sorter = new Sorter($id); return $sorter->header($string, $sort); }
/** * Smarty sorter header modifier plugin * * Type: modifier<br> * Name: price<br> * Purpose: convert string to sorter header * @param string * @return string */ function smarty_modifier_sorter($string, $id) { $sorter = new Sorter($id); return $sorter->header($string); }