/**
  * Get list of localizations
  *
  * @throws XmlRpc\Exception\XmlRpcActionDenied
  * @return array
  */
 public function getLocalizations()
 {
     // check user permission
     if (!AclService::checkPermission('xmlrpc_get_localizations')) {
         throw new XmlRpcActionDenied(self::REQUEST_DENIED);
     }
     // fire the get localizations via XmlRpc event
     LocalizationEvent::fireGetLocalizationsViaXmlRpcEvent();
     return LocalizationService::getLocalizations();
 }
Exemple #2
0
 /**
  * Init
  *
  * @param \Zend\ModuleManager\ModuleManagerInterface $moduleManager
  * @return void
  */
 public function init(ModuleManagerInterface $moduleManager)
 {
     // get service manager
     $this->serviceLocator = $moduleManager->getEvent()->getParam('ServiceManager');
     // clear cache
     $eventManager = AclEvent::getEventManager();
     $eventManager->attach(AclEvent::DELETE_ROLE, function () {
         PageCacheUtility::clearPageCache();
     });
     // clear cache
     $eventManager = LocalizationEvent::getEventManager();
     $eventManager->attach(LocalizationEvent::UNINSTALL, function () {
         PageCacheUtility::clearPageCache();
     });
 }
Exemple #3
0
 /**
  * Init application
  * 
  * @param \Zend\ModuleManager\ModuleEvent $e
  */
 public function initApplication(ModuleEvent $e)
 {
     // init user identity
     $this->initUserIdentity();
     // init time zone
     $this->initTimeZone();
     // clear users caches
     $eventManager = LayoutEvent::getEventManager();
     $eventManager->attach(LayoutEvent::UNINSTALL, function ($e) {
         UserCacheUtility::clearUserCache();
     });
     $eventManager = LocalizationEvent::getEventManager();
     $eventManager->attach(LocalizationEvent::UNINSTALL, function ($e) {
         UserCacheUtility::clearUserCache();
     });
 }
Exemple #4
0
 /**
  * Init application
  *
  * @return void
  */
 public function initApplication()
 {
     // init php settings
     $this->initPhpSettings();
     // init a strict sql mode
     $this->initSqlStrictMode();
     // set the service manager
     ServiceLocatorService::setServiceLocator($this->serviceLocator);
     $request = $this->serviceLocator->get('Request');
     if (!$request instanceof ConsoleRequest) {
         // init session
         $this->initSession();
     }
     $eventManager = LocalizationEvent::getEventManager();
     $eventManager->attach(LocalizationEvent::UNINSTALL, function () {
         ApplicationCacheUtility::clearSettingCache();
     });
 }