本文整理汇总了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');
}
示例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);
}
示例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');
}
示例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);
}
}
示例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);
}