本文整理汇总了PHP中OCP\App\IAppManager::disableApp方法的典型用法代码示例。如果您正苦于以下问题:PHP IAppManager::disableApp方法的具体用法?PHP IAppManager::disableApp怎么用?PHP IAppManager::disableApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\App\IAppManager
的用法示例。
在下文中一共展示了IAppManager::disableApp方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forceSingleUserAndTrashbin
/**
* Set single user mode and disable the trashbin app
*/
protected function forceSingleUserAndTrashbin()
{
$this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin');
$this->wasSingleUserModeEnabled = $this->config->getSystemValue('singleuser', false);
$this->config->setSystemValue('singleuser', true);
$this->appManager->disableApp('files_trashbin');
}
示例2: __construct
/**
* @param IManager $encryptionManager
* @param IAppManager $appManager
* @param IConfig $config
* @param QuestionHelper $questionHelper
*/
public function __construct(IManager $encryptionManager, IAppManager $appManager, IConfig $config, QuestionHelper $questionHelper)
{
parent::__construct();
$this->appManager = $appManager;
$this->encryptionManager = $encryptionManager;
$this->config = $config;
$this->questionHelper = $questionHelper;
$this->wasTrashbinEnabled = $this->appManager->isEnabledForUser('files_trashbin');
$this->wasSingleUserModeEnabled = $this->config->getSystemValue('singleuser', false);
$this->config->setSystemValue('singleuser', true);
$this->appManager->disableApp('files_trashbin');
}
示例3: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$appId = $input->getArgument('app-id');
if ($this->manager->isInstalled($appId)) {
try {
$this->manager->disableApp($appId);
$output->writeln($appId . ' disabled');
} catch (\Exception $e) {
$output->writeln($e->getMessage());
return 2;
}
} else {
$output->writeln('No such app enabled: ' . $appId);
}
}
示例4: testDisableApp
public function testDisableApp()
{
$this->expectClearCache();
$this->manager->disableApp('test');
$this->assertEquals('no', $this->appConfig->getValue('test', 'enabled', 'no'));
}
示例5: disable
/**
* @param array $parameters
* @return OC_OCS_Result
*/
public function disable($parameters)
{
$app = $parameters['appid'];
$this->appManager->disableApp($app);
return new OC_OCS_Result(null, 100);
}