2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_Controller_Action_Helper_SyjMedias extends Zend_Controller_Action_Helper_Abstract
9 public function init() {
10 $this->_config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/medias.ini', APPLICATION_ENV);
13 public function addScripts($action) {
14 $view = $this->getActionController()->view;
15 if (APPLICATION_ENV == "production") {
16 $view->headScript()->appendFile('js/' . $action . '.js');
19 $scripts = explode(',', $this->_config->get('scripts')->get($action));
20 foreach ($scripts as $name) {
21 $view->headScript()->appendFile('js/' . trim($name) . '.js');