public function init()
 {
     parent::init();
     $this->view->language = Cible_FunctionsGeneral::getLanguageSuffix($this->_currentInterfaceLanguage);
     $this->view->headLink()->appendStylesheet($this->view->locateFile('newsletterStats.css'));
     $this->view->headScript()->appendFile($this->view->locateFile('jquery.dataTables.min.js', 'datatable'));
     $this->view->headScript()->appendFile($this->view->locateFile('dataTables.fourButtonNavigation.js', 'datatable/plugins'));
     $this->view->headScript()->appendFile($this->view->locateFile('statisticAction.js'));
     $this->nlObject = new NewsletterLog(array('moduleId' => $this->_moduleID));
 }
Beispiel #2
0
 public function init()
 {
     $this->view->headScript()->appendFile($this->view->locateFile('tiny_mce.js', 'tiny_mce'));
     $this->view->headScript()->appendFile($this->view->locateFile('mcimagemanager.js', 'tiny_mce/plugins/imagemanager/js/'));
     parent::init();
     $dataPath = "../../" . $this->_config->document_root . "/data/";
     $this->_imageFolder = $dataPath . "images/" . $this->_moduleTitle . "/";
     $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/";
     $this->_imgMenuFolder = $dataPath . "images/" . $this->_folderMenu . "/";
     $this->_rootMenuImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_folderMenu . "/";
 }
 /**
  * Set some properties to redirect and process actions.
  *
  * @access public
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Sets the called action name. This will be dispatched to the method
     $this->_currentAction = $this->_getParam('action');
     // The action (process) to do for the selected object
     $this->_actionKey = $this->_getParam('actionKey');
     $this->_formatName();
     $this->view->assign('cleaction', $this->_labelSuffix);
     $dataImagePath = "../../" . $this->_config->document_root . "/data/images/";
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_imageFolder = $dataImagePath . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
 }
Beispiel #4
0
 public function init()
 {
     parent::init();
     $dirModuleName = $this->getRequest()->getModuleName();
     $this->_moduleName = Cible_Translation::getCibleText("module_{$dirModuleName}");
     $this->view->assign('moduleName', $this->_moduleName);
     /* if( isset( $this->_config->modules->$dirModuleName->id ) )
               $this->_moduleId = $this->_config->modules->$dirModuleName->id;
               else
               Throw new Exception('Fails to set moduleId');
     
               if( isset( $this->_config->modules->$dirModuleName->defaultController ) )
               $this->_defaultController = str_replace("'",'',$this->_config->modules->$dirModuleName->defaultController);
     
               if( isset( $this->_config->modules->$dirModuleName->defaultAction ) )
               $this->_defaultAction = str_replace("'",'',$this->_config->modules->$dirModuleName->defaultAction);
              */
     Zend_Registry::set('baseUrl', $this->view->baseUrl());
     $this->view->TreeView = $this->view->getTreeView();
 }
Beispiel #5
0
 /**
  * Set some properties to redirect and process actions.
  *
  * @access public
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Sets the called action name. This will be dispatched to the method
     $this->_currentAction = $this->_getParam('action');
     // The action (process) to do for the selected object
     $this->_actionKey = $this->_getParam('actionKey');
     $this->_formatName();
     $this->view->assign('cleaction', $this->_labelSuffix);
     $dataImagePath = "../../" . $this->_config->document_root . "/data/images/";
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_imageFolder = $dataImagePath . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     if (isset($this->_objectList[$this->_currentAction])) {
         $this->_rootImgPath = Zend_Registry::get("www_root") . "/data/images/" . $this->_moduleTitle . "/" . $this->_objectList[$this->_currentAction] . "/";
     }
     // Set the default objects according to the modules list;
     $modulesProfiles = Cible_FunctionsModules::modulesProfile();
     $this->view->profilesList = $modulesProfiles;
     foreach ($modulesProfiles as $id => $name) {
         $value = $name['M_MVCModuleTitle'];
         if (!in_array($value, $this->_objectList)) {
             switch ($value) {
                 //                    case 'newsletter':
                 //                        $this->_objectList[$value] = 'NewsletterProfilesObject';
                 //                        break;
                 case 'order':
                     $this->_objectList[$value] = 'MemberProfilesObject';
                     break;
                 case 'retailers':
                     $this->_objectList[$value] = 'RetailersObject';
                     break;
                     //                    case 'member':
                     //                        $this->_objectList[$value] = 'MemberProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                     //                    case 'parent':
                     //                        $this->_objectList[$value] = 'ParentProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                     //                    case 'medical':
                     //                        $this->_objectList[$value] = 'MedicalProfilesObject';
                     ////                        $this->_joinTables[] = $this->_objectList[$value];
                     //                        break;
                 //                    case 'member':
                 //                        $this->_objectList[$value] = 'MemberProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 //                    case 'parent':
                 //                        $this->_objectList[$value] = 'ParentProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 //                    case 'medical':
                 //                        $this->_objectList[$value] = 'MedicalProfilesObject';
                 ////                        $this->_joinTables[] = $this->_objectList[$value];
                 //                        break;
                 default:
                     $this->_objectList[$value] = ucfirst($value) . 'ProfilesObject';
                     break;
             }
         }
         $this->_objectList = array_unique($this->_objectList);
     }
     switch (Zend_Registry::get('languageID')) {
         case '1':
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-fr.js");
             break;
         case '2':
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-en.js");
             break;
         default:
             $this->view->jQuery()->addJavascriptFile("{$this->view->baseUrl()}/js/jquery/localizations/ui.datepicker-fr.js");
             break;
     }
     $this->view->headScript()->appendFile($this->view->locateFile('jquery.validate.min.js', 'jquery'));
     $this->view->headScript()->appendFile($this->view->locateFile('additional-methods.min.js', 'jquery'));
     $this->view->headLink()->appendStylesheet($this->view->locateFile('profile.css'));
 }