diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-21 21:07:15 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-21 21:07:15 -0400 |
commit | 78ecdc05c34f706a4eab3ff09161a3a79189cdf6 (patch) | |
tree | 8fbc6f854b73509408b841fc21ba698f38b0b931 /app/Helper | |
parent | 2cff1d6a37977caec4376e1dee0b9215d2ecdca8 (diff) |
Add plugin hooks for assets
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/Hook.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/Helper/Hook.php b/app/Helper/Hook.php index d7fe3d34..bf879878 100644 --- a/app/Helper/Hook.php +++ b/app/Helper/Hook.php @@ -11,6 +11,26 @@ namespace Helper; class Hook extends \Core\Base { /** + * Add assets JS or CSS + * + * @access public + * @param string $type + * @param string $hook + * @param array $variables + * @return string + */ + public function asset($type, $hook) + { + $buffer = ''; + + foreach ($this->hook->getListeners($hook) as $file) { + $buffer .= $this->helper->asset->$type($file); + } + + return $buffer; + } + + /** * Render all attached hooks * * @access public |