本文整理汇总了PHP中OC_App::enable方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_App::enable方法的具体用法?PHP OC_App::enable怎么用?PHP OC_App::enable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_App
的用法示例。
在下文中一共展示了OC_App::enable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enableApp
function enableApp($app) {
try {
OC_App::enable($app);
} catch (Exception $e) {
echo $e;
}
}
示例2: tearDown
function tearDown()
{
// reset app files_encryption
if ($this->stateFilesEncryption) {
\OC_App::enable('files_encryption');
} else {
\OC_App::disable('files_encryption');
}
}
示例3: tearDown
function tearDown()
{
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin');
} else {
OC_App::disable('files_trashbin');
}
}
示例4: tearDown
protected function tearDown()
{
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
\OC_App::enable('files_trashbin');
} else {
\OC_App::disable('files_trashbin');
}
parent::tearDown();
}
示例5: tearDownAfterClass
public static function tearDownAfterClass()
{
\OC_FileProxy::$enabled = true;
// cleanup test user
\OC_User::deleteUser(\Test_Encryption_Keymanager::TEST_USER);
// reset app files_trashbin
if (self::$stateFilesTrashbin) {
OC_App::enable('files_trashbin');
}
}
示例6: tearDown
function tearDown()
{
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin');
} else {
OC_App::disable('files_trashbin');
}
$this->assertTrue(\OC_FileProxy::$enabled);
}
示例7: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup test user
\OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
if (self::$encryptionStatus === true) {
\OC_App::enable('files_encryption');
}
\OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
\OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
\OC_Hook::clear();
}
示例8: tearDown
function tearDown()
{
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
OC_App::enable('files_trashbin');
} else {
OC_App::disable('files_trashbin');
}
$this->assertTrue(\OC_FileProxy::$enabled);
\OCP\Config::deleteSystemValue('cipher');
}
示例9: tearDown
protected function tearDown()
{
// reset app files_trashbin
if ($this->stateFilesTrashbin) {
\OC_App::enable('files_trashbin');
} else {
\OC_App::disable('files_trashbin');
}
$this->assertTrue(\OC_FileProxy::$enabled);
$this->config->deleteSystemValue('cipher');
parent::tearDown();
}
示例10: setUp
public function setUp()
{
parent::setUp();
\OC_App::enable('files_antivirus');
$this->db = \OC::$server->getDb();
$this->application = new Application();
$this->container = $this->application->getContainer();
$this->config = $this->getMockBuilder('\\OCA\\Files_Antivirus\\AppConfig')->disableOriginalConstructor()->getMock();
$this->config->method('__call')->will($this->returnCallback(array($this, 'getAppValue')));
$this->l10n = $this->getMockBuilder('\\OC_L10N')->disableOriginalConstructor()->getMock();
$this->l10n->method('t')->will($this->returnArgument(0));
}
示例11: tearDown
public function tearDown()
{
if ($this->cache) {
$this->cache->clear();
}
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
Filesystem::tearDown();
// reset app files_encryption
if ($this->stateFilesEncryption) {
\OC_App::enable('files_encryption');
}
}
示例12: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$appId = $input->getArgument('app-id');
if (\OC_App::isEnabled($appId)) {
$output->writeln($appId . ' is already enabled');
} else {
if (!\OC_App::getAppPath($appId)) {
$output->writeln($appId . ' not found');
} else {
\OC_App::enable($appId);
$output->writeln($appId . ' enabled');
}
}
}
示例13: tearDown
protected function tearDown()
{
if ($this->cache) {
$this->cache->clear();
}
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
Filesystem::tearDown();
Filesystem::mount($this->originalStorage, array(), '/');
// reset app files_encryption
if ($this->stateFilesEncryption) {
\OC_App::enable('files_encryption');
}
parent::tearDown();
}
示例14: tearDownAfterClass
public static function tearDownAfterClass()
{
\OC_FileProxy::$enabled = true;
// cleanup test user
\OC_User::deleteUser(\Test_Encryption_Keymanager::TEST_USER);
// reset app files_trashbin
if (self::$stateFilesTrashbin) {
OC_App::enable('files_trashbin');
}
\OC_Hook::clear();
\OC_FileProxy::clearProxies();
// Delete keys in /data/
$view = new \OC\Files\View('/');
$view->rmdir('public-keys');
$view->rmdir('owncloud_private_key');
}
示例15: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$appId = $input->getArgument('app-id');
if (!\OC_App::getAppPath($appId)) {
$output->writeln($appId . ' not found');
return 1;
}
$groups = $input->getOption('groups');
if (empty($groups)) {
\OC_App::enable($appId);
$output->writeln($appId . ' enabled');
} else {
\OC_App::enable($appId, $groups);
$output->writeln($appId . ' enabled for groups: ' . implode(', ', $groups));
}
return 0;
}