當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OC_App::enabledAppsCache方法代碼示例

本文整理匯總了PHP中OC_App::enabledAppsCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP OC_App::enabledAppsCache方法的具體用法?PHP OC_App::enabledAppsCache怎麽用?PHP OC_App::enabledAppsCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OC_App的用法示例。


在下文中一共展示了OC_App::enabledAppsCache方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: disable

 /**
  * This function set an app as disabled in appconfig.
  * @param string $app app
  */
 public static function disable($app)
 {
     if ($app === 'files') {
         throw new \Exception("files can't be disabled.");
     }
     self::$enabledAppsCache = array();
     // flush
     // check if app is a shipped app or not. if not delete
     \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
     // Convert OCS ID to regular application identifier
     if (self::getInternalAppIdByOcs($app) !== false) {
         $app = self::getInternalAppIdByOcs($app);
     }
     OC_Appconfig::setValue($app, 'enabled', 'no');
 }
開發者ID:kebenxiaoming,項目名稱:owncloudRedis,代碼行數:19,代碼來源:app.php

示例2: disable

 /**
  * This function set an app as disabled in appconfig.
  *
  * @param string $app app
  * @throws Exception
  */
 public static function disable($app)
 {
     // Convert OCS ID to regular application identifier
     if (self::getInternalAppIdByOcs($app) !== false) {
         $app = self::getInternalAppIdByOcs($app);
     }
     self::$enabledAppsCache = array();
     // flush
     // check if app is a shipped app or not. if not delete
     \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
     $appManager = \OC::$server->getAppManager();
     $appManager->disableApp($app);
 }
開發者ID:pierreozoux,項目名稱:core,代碼行數:19,代碼來源:app.php

示例3: disable

 /**
  * This function set an app as disabled in appconfig.
  * @param string $app app
  * @throws Exception
  */
 public static function disable($app)
 {
     if ($app === 'files') {
         throw new \Exception("files can't be disabled.");
     }
     self::$enabledAppsCache = array();
     // flush
     // check if app is a shipped app or not. if not delete
     \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
     OC_Appconfig::setValue($app, 'enabled', 'no');
 }
開發者ID:heldernl,項目名稱:owncloud8-extended,代碼行數:16,代碼來源:app.php

示例4: disable

 /**
  * @brief disables an app
  * @param string $app app
  * @return bool
  *
  * This function set an app as disabled in appconfig.
  */
 public static function disable($app)
 {
     self::$enabledAppsCache = array();
     // flush
     // check if app is a shipped app or not. if not delete
     \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
     OC_Appconfig::setValue($app, 'enabled', 'no');
     // check if app is a shipped app or not. if not delete
     if (!OC_App::isShipped($app)) {
         OC_Installer::removeApp($app);
     }
 }
開發者ID:hjimmy,項目名稱:owncloud,代碼行數:19,代碼來源:app.php

示例5: disable

 /**
  * This function set an app as disabled in appconfig.
  *
  * @param string $app app
  * @throws Exception
  */
 public static function disable($app)
 {
     // Convert OCS ID to regular application identifier
     if (self::getInternalAppIdByOcs($app) !== false) {
         $app = self::getInternalAppIdByOcs($app);
     }
     // flush
     self::$enabledAppsCache = array();
     // run uninstall steps
     $appData = OC_App::getAppInfo($app);
     if (!is_null($appData)) {
         OC_App::executeRepairSteps($app, $appData['repair-steps']['uninstall']);
     }
     // emit disable hook - needed anymore ?
     \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
     // finally disable it
     $appManager = \OC::$server->getAppManager();
     $appManager->disableApp($app);
 }
開發者ID:stweil,項目名稱:owncloud-core,代碼行數:25,代碼來源:app.php


注:本文中的OC_App::enabledAppsCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。