summaryrefslogtreecommitdiff
path: root/app/Helper/Hook.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-04 20:10:34 -0500
committerFrederic Guillot <fred@kanboard.net>2016-03-04 20:10:34 -0500
commit8f3e2b2e5c62a6130f6c8867ab335fb4c1a32c5c (patch)
treece28cdc2dba9c31560ef753ac1b4dc39d567b7a6 /app/Helper/Hook.php
parentf32507d423c46e8e9612b5239728e6c617e4cbcb (diff)
Helper refactoring
Diffstat (limited to 'app/Helper/Hook.php')
-rw-r--r--app/Helper/Hook.php64
1 files changed, 0 insertions, 64 deletions
diff --git a/app/Helper/Hook.php b/app/Helper/Hook.php
deleted file mode 100644
index 7b691949..00000000
--- a/app/Helper/Hook.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-namespace Kanboard\Helper;
-
-/**
- * Template Hook helpers
- *
- * @package helper
- * @author Frederic Guillot
- */
-class Hook extends \Kanboard\Core\Base
-{
- /**
- * Add assets JS or CSS
- *
- * @access public
- * @param string $type
- * @param string $hook
- * @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
- * @param string $hook
- * @param array $variables
- * @return string
- */
- public function render($hook, array $variables = array())
- {
- $buffer = '';
-
- foreach ($this->hook->getListeners($hook) as $template) {
- $buffer .= $this->template->render($template, $variables);
- }
-
- return $buffer;
- }
-
- /**
- * Attach a template to a hook
- *
- * @access public
- * @param string $hook
- * @param string $template
- * @return \Helper\Hook
- */
- public function attach($hook, $template)
- {
- $this->hook->on($hook, $template);
- return $this;
- }
-}