1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

Page/Menu Custom Fields.

This commit is contained in:
Cameron
2017-01-21 13:42:36 -08:00
parent f545a2e01d
commit acbf93ef8a
4 changed files with 140 additions and 18 deletions

View File

@@ -3641,6 +3641,38 @@ class e_parser
}
/**
* @param $text
* @return string
*/
public function toLabel($text, $type = null)
{
if($type === null)
{
$type = 'default';
}
$tmp = explode(",",$text);
$opt = array();
foreach($tmp as $v)
{
$opt[] = "<span class='label label-".$type."'>".$v."</span>";
}
return implode(" ",$opt);
}
/**
* Take a file-path and convert it to a download link.
* @todo
* @param $text
* @return string
*/
public function toFile($text)
{
}
/**
* Render an avatar based on supplied user data or current user when missing.