示例#1
0
 /**
  * (non-PHPdoc)
  * @see IfwPsn_Wp_Plugin_Bootstrap_Abstract::bootstrap()
  */
 public function bootstrap()
 {
     $featureLoader = new Psn_Feature_Loader($this->_pm);
     $featureLoader->load();
     if ($this->_pm->getAccess()->isAdmin()) {
         // on admin access
         // add plugin menu links
         IfwPsn_Wp_Proxy_Filter::addPluginActionLinks($this->_pm, array($this, 'addPluginActionLinks'));
         // set installer / uninstaller
         require_once $this->_pm->getPathinfo()->getRootLib() . 'Psn/Installer/Activation.php';
         require_once $this->_pm->getPathinfo()->getRootLib() . 'Psn/Installer/Uninstall.php';
         $this->getInstaller()->addActivation(new Psn_Installer_Activation());
         $this->getInstaller()->addUninstall(new Psn_Installer_Uninstall());
         // load options handler
         require_once $this->_pm->getPathinfo()->getRootLib() . 'Psn/Admin/Options/Handler.php';
         $optionsHandler = new Psn_Admin_Options_Handler($this->_pm);
         $optionsHandler->load();
     }
     if ($this->_pm->getAccess()->isPlugin()) {
         // register patches
         require_once $this->_pm->getPathinfo()->getRootLib() . 'Psn/Patch/Database.php';
         $this->getUpdateManager()->getPatcher()->addPatch(new Psn_Patch_Database());
         // register selftests
         IfwPsn_Wp_Proxy_Action::addPlugin($this->_pm, 'selftester_activate', array($this, 'addSelftests'));
     }
     require_once $this->_pm->getPathinfo()->getRootLib() . '/Psn/Notification/Manager.php';
     $this->_notificationManager = new Psn_Notification_Manager($this->_pm);
     $this->_notificationManager->setDeferredExecution();
     //IfwPsn_Wp_Proxy_Action::addInit(array($this, 'test'));
 }
示例#2
0
 protected function _registerLiteNav()
 {
     if (!$this->_pm->isPremium()) {
         IfwPsn_Wp_Proxy_Action::addPlugin($this->_pm, 'after_admin_navigation_rules', array($this, 'addMailTplNav'));
         IfwPsn_Wp_Proxy_Action::addPlugin($this->_pm, 'after_admin_navigation_htmlmails', array($this, 'addRecipientsListsNav'));
     }
 }
示例#3
0
 /**
  * Loads the modules after preBootstrap objects are initialized
  */
 private function _moduleBootstrap()
 {
     require_once $this->_pm->getPathinfo()->getRootLib() . 'IfwPsn/Wp/Module/Manager.php';
     $this->_moduleManager = new IfwPsn_Wp_Module_Manager($this->_pm);
     IfwPsn_Wp_Proxy_Action::doPlugin($this->_pm, 'before_modules_load', $this->_moduleManager);
     $pluginConfig = $this->_pm->getConfig()->plugin;
     if (!isset($pluginConfig->simulateLiteVersion) || empty($pluginConfig->simulateLiteVersion)) {
         $this->_moduleManager->load();
     }
     $this->_notifyObservers(self::OBSERVER_POST_MODULES);
     // register module controller path before controller init
     IfwPsn_Wp_Proxy_Action::addPlugin($this->_pm, 'before_controller_init', array($this->_moduleManager, 'registerModules'));
 }