public function setView(Zend_View_Interface $view) { parent::setView($view); $oid = spl_object_hash($view); if (!isset(self::$_enabledView[$oid])) { $view->addBasePath(dirname(__FILE__) . '/files'); self::$_enabledView[$oid] = true; } }
public function setView(Zend_View_Interface $view) { parent::setView($view); $this->view->addBasePath(HEAP_PATH . DS . 'Blocks/App/views')->addBasePath(MODULES_PATH . DS . 'Blocks/App/views'); $this->_blockModel = new Modules_Blocks_Model_Blocks(); if ($this->isAdmin()) { $this->view->current_route_id = Zend_Registry::get('RouteCurrentId'); $this->view->headScript()->appendFile($this->view->libUrl('/Blocks/public/js/admin.js'))->prependScript(' var _urlBlockSave = "' . $this->view->url(array('module' => 'blocks', 'controller' => 'admin', 'action' => 'save'), 'mvc', true) . '", _urlBlockInfo = "' . $this->view->url(array('module' => 'blocks', 'controller' => 'admin', 'action' => 'blockinfo'), 'mvc', true) . '", _urlBlockDelete = "' . $this->view->url(array('module' => 'blocks', 'controller' => 'admin', 'action' => 'blockdelete'), 'mvc', true) . '", _currentRouteId = ' . $this->view->current_route_id . '; '); } }