diff options
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 |