Example #1
0
 /**
  * Initialize the admin interface
  *
  * @return void
  */
 protected function _initInterface()
 {
     if (!$this->_request->isXmlHttpRequest()) {
         //load the module, controller, and action for reference
         $module = $this->_request->getModuleName();
         $controller = $this->_request->getControllerName();
         if ('public' != $module && 'public' != $controller) {
             // Get config
             $config = Zend_Registry::get('config');
             // Setup layout
             $options = array('layout' => $config->design->adminLayout, 'layoutPath' => $config->design->adminLayoutFolder, 'contentKey' => 'form');
             $this->layout = Zend_Layout::startMvc($options);
             $this->view = $this->layout->getView();
             // Load the common helpers
             Digitalus_View_RegisterHelpers::register($this->view);
             $this->view->setScriptPath($config->filepath->adminViews);
             // add helpers
             $this->view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
             $this->view->jQuery()->setLocalPath($this->view->getBaseUrl() . '/scripts/jquery/' . self::JQUERY_VERSION);
             $this->view->jQuery()->setUiLocalPath($this->view->getBaseUrl() . '/scripts/jquery/' . self::JQUERY_UI_VERSION);
             $this->view->jQuery()->addStylesheet($this->view->getBaseUrl() . '/scripts/jquery/ui-theme/' . self::JQUERY_UI_THEME);
             $this->view->jQuery()->enable();
             $this->view->jQUery()->uiEnable();
             // Page links
             $this->view->toolbarLinks = array();
         }
     }
 }
Example #2
0
 private function _isAdminPage()
 {
     $module = $this->_request->getModuleName();
     $controller = $this->_request->getControllerName();
     if ($module != 'public' && $controller != 'public') {
         return true;
     }
 }