diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-21 22:50:57 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-21 22:50:57 -0500 |
commit | 8976f4d15c151afaf2249c526c6a42463e98f491 (patch) | |
tree | 990ee2b73ad171b0d04fc199e6d20242e80da8da /app/Helper | |
parent | a3bb27109dc01fa5df2c771b84620f1e8f56b849 (diff) |
Use components to render charts
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/AppHelper.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Helper/AppHelper.php b/app/Helper/AppHelper.php index 09f280cb..62062244 100644 --- a/app/Helper/AppHelper.php +++ b/app/Helper/AppHelper.php @@ -13,6 +13,18 @@ use Kanboard\Core\Base; class AppHelper extends Base { /** + * Render Javascript component + * + * @param string $name + * @param array $params + * @return string + */ + public function component($name, array $params = array()) + { + return '<div class="js-'.$name.'" data-params=\''.json_encode($params, JSON_HEX_APOS).'\'></div>'; + } + + /** * Get config variable * * @access public |