Add plugin hooks for assets
This commit is contained in:
@@ -10,6 +10,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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user