Ejemplo n.º 1
0
 public function init()
 {
     $configDev = (int) OW::getConfig()->getValue("base", self::CONFIG_NAME);
     if ($configDev > 0) {
         $this->refreshEntitiesCache($configDev);
         OW::getConfig()->saveConfig("base", self::CONFIG_NAME, 0);
         OW::getApplication()->redirect();
     }
     if (defined("OW_DEV_MODE") && OW_DEV_MODE) {
         $this->refreshEntitiesCache(OW_DEV_MODE);
     }
     // show profiler only for desktop and if it's enabled
     if (!OW::getApplication()->isDesktop() || OW::getRequest()->isAjax() || !OW_PROFILER_ENABLE) {
         return;
     }
     OW_View::setCollectDevInfo(true);
     OW::getEventManager()->setDevMode(true);
     OW::getEventManager()->bind("base.append_markup", array($this, "onAppendMarkup"));
 }