本文整理汇总了PHP中OCP\App::registerPersonal方法的典型用法代码示例。如果您正苦于以下问题:PHP App::registerPersonal方法的具体用法?PHP App::registerPersonal怎么用?PHP App::registerPersonal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\App
的用法示例。
在下文中一共展示了App::registerPersonal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerSettings
/**
* Register settings templates
*/
public function registerSettings()
{
$container = $this->getContainer();
$backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
\OCP\App::registerAdmin('files_external', 'settings');
\OCP\App::registerPersonal('files_external', 'personal');
}
示例2: registerPersonal
/**
* Tells ownCloud to include a template in the personal overview
* @param string $mainPath the path to the main php file without the php
* suffix, relative to your apps directory! not the template directory
* @param string $appName the name of the app, defaults to the current one
*/
public function registerPersonal($mainPath, $appName = null)
{
if ($appName === null) {
$appName = $this->appName;
}
\OCP\App::registerPersonal($appName, $mainPath);
}
示例3: init
public static function init()
{
\OC::$CLASSPATH['OCA_Gsync\\Contact'] = self::APP_ID . '/lib/contact.php';
\OC::$CLASSPATH['OCA_Gsync\\Request'] = self::APP_ID . '/lib/request.php';
\OC::$CLASSPATH['OCA_Gsync\\Adapter'] = self::APP_ID . '/lib/adapter.php';
\OCP\App::registerPersonal(self::APP_ID, 'settings');
self::$l10n = \OC_L10N::get('core');
}
示例4: Application
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Documents\AppInfo;
use OCA\Documents\Filter\Office;
use OCA\Documents\Config;
$app = new Application();
$c = $app->getContainer();
\OCP\App::registerAdmin('documents', 'admin');
\OCP\App::registerPersonal('documents', 'personal');
$navigationEntry = function () use($c) {
return ['id' => 'documents_index', 'order' => 2, 'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('documents.document.index'), 'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('documents', 'documents.svg'), 'name' => $c->query('L10N')->t('Documents')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
//Script for registering file actions
$request = \OC::$server->getRequest();
if (isset($request->server['REQUEST_URI'])) {
$url = $request->server['REQUEST_URI'];
if (preg_match('%index.php/apps/files(/.*)?%', $url)) {
\OCP\Util::addScript('documents', 'viewer/viewer');
}
}
if ($c->query('AppConfig')->isConverterEnabled()) {
$docFilter = new Office(['read' => ['target' => 'application/vnd.oasis.opendocument.text', 'format' => 'odt:writer8', 'extension' => 'odt'], 'write' => ['target' => 'application/msword', 'format' => 'doc', 'extension' => 'doc']]);
$docxFilter = new Office(['read' => ['target' => 'application/vnd.oasis.opendocument.text', 'format' => 'odt:writer8', 'extension' => 'odt'], 'write' => ['target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'format' => 'docx', 'extension' => 'docx']]);
示例5: registerPersonalPage
/**
* Register personal settings for notifications and emails
*/
public function registerPersonalPage()
{
\OCP\App::registerPersonal($this->getContainer()->getAppName(), 'personal');
}
示例6:
<?php
/**
* ownCloud - ocDownloader
*
* This file is licensed under the Creative Commons BY-SA License version 3 or
* later. See the COPYING file.
*
* @author Xavier Beurois <www.sgc-univ.net>
* @copyright Xavier Beurois 2015
*/
namespace OCA\ocDownloader\AppInfo;
$l = \OC::$server->getL10N('ocdownloader');
$g = \OC::$server->getURLGenerator();
\OCP\App::addNavigationEntry(['id' => 'ocdownloader', 'order' => 10, 'href' => $g->linkToRoute('ocdownloader.Index.Add'), 'icon' => $g->imagePath('ocdownloader', 'ocdownloader.svg'), 'name' => 'ocDownloader']);
\OCP\App::registerAdmin('ocdownloader', 'settings/admin');
\OCP\App::registerPersonal('ocdownloader', 'settings/personal');
示例7: Application
<?php
namespace OCA\PasswordPolicy\AppInfo;
use OCP\AppFramework\App;
use OCA\PasswordPolicy\Hooks\PasswordPolicyHooks;
use OCA\PasswordPolicy\Appinfo;
use OCA\PasswordPolicy\Appinfo\Application;
\OCP\App::registerAdmin('passwordpolicy', 'admin');
\OCP\App::registerPersonal('passwordpolicy', 'personal');
//\OCP\Util::connectHook('OC_User', 'pre_setPassword', 'OCA\PasswordPolicy\Hooks\PasswordPolicyHooks', 'pre_setPassword');
$app = new Application();
$app->getContainer()->query('PasswordPolicyHooks')->register();
示例8: Application
$l = \OC::$server->getL10N('files_sharing');
\OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php';
\OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
\OC::$CLASSPATH['OC\\Files\\Storage\\Shared'] = 'files_sharing/lib/sharedstorage.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\SharedScanner'] = 'files_sharing/lib/scanner.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Cache'] = 'files_sharing/lib/cache.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Updater'] = 'files_sharing/lib/updater.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
\OC::$CLASSPATH['OCA\\Files\\Share\\Maintainer'] = 'files_sharing/lib/maintainer.php';
\OC::$CLASSPATH['OCA\\Files\\Share\\Proxy'] = 'files_sharing/lib/proxy.php';
$application = new Application();
$application->registerMountProviders();
\OCP\App::registerAdmin('files_sharing', 'settings-admin');
\OCP\App::registerPersonal('files_sharing', 'settings-personal');
\OCA\Files_Sharing\Helper::registerHooks();
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () {
\OCP\Util::addScript('files_sharing', 'share');
\OCP\Util::addScript('files_sharing', 'sharetabview');
if (\OC::$server->getConfig()->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes') {
\OCP\Util::addScript('files_sharing', 'external');
}
\OCP\Util::addStyle('files_sharing', 'sharetabview');
});
// \OCP\Util::addStyle('files_sharing', 'sharetabview');
\OC::$server->getActivityManager()->registerExtension(function () {
return new \OCA\Files_Sharing\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager());
示例9: registerSettings
public function registerSettings()
{
// Register settings scripts
App::registerAdmin('encryption', 'settings/settings-admin');
App::registerPersonal('encryption', 'settings/settings-personal');
}
示例10: App
<?php
use OCP\AppFramework\App;
$app = new App('passwords');
$container = $app->getContainer();
$l = \OCP\Util::getL10N('passwords');
\OCP\App::registerAdmin('passwords', 'templates/admin.settings');
\OCP\App::registerPersonal('passwords', 'templates/personal.settings');
$urlGenerator = $container->query('OCP\\IURLGenerator');
$l10n = $container->query('OCP\\IL10N');
\OCP\App::addNavigationEntry(array('id' => 'passwords', 'order' => 9999, 'href' => $urlGenerator->linkToRoute('passwords.page.index'), 'icon' => $urlGenerator->imagePath('passwords', 'app.svg'), 'name' => $l10n->t('Passwords')));
示例11: function
<?php
$l = OC_L10N::get('files_opds');
\OCP\App::registerPersonal('files_opds', 'personal');
\OCP\App::registerAdmin('files_opds', 'admin');
/* register preview provider */
\OC::$server->getPreviewManager()->registerProvider('/application\\/epub\\+zip/', function () {
return new OCA\Files_Opds\EpubPreview();
});
示例12: ConfigApp
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\User_Servervars2\AppInfo;
$app = new ConfigApp();
$c = $app->getContainer();
$appName = 'user_servervars2';
if (!\OCP\App::isEnabled($appName)) {
return;
}
//To put a template into admin menu
\OCP\App::registerAdmin('user_servervars2', 'settings/admin');
\OCP\App::registerPersonal('user_servervars2', 'settings/user');
$login = array('href' => $app->getAppConfig()->getValue('user_servervars2', 'sso_url'), 'name' => $app->getAppConfig()->getValue('user_servervars2', 'button_name', 'Use Your ID Provider'));
\OC_App::registerLogIn($login);
$app->getUserManager()->registerBackend($c->query('UserBackend'));
//$app->getGroupManager()->addBackend( new \OC_Group_Database() );
$c->query('ServerVarsHooks')->register($app->getUserSession());
$authStatus = $c->isLoggedIn();
// - trigger authentication -
// http://localhost/core/index.php?XDEBUG_SESSION_START=sublime.xdebug&app=usv2&debug=1
//-- TRIGGERS --
$interceptor = $c->query('Interceptor');
$interceptor->run();
示例13: App
* ownCloud - sipgate
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Raphael Pigulla <pigulla@four66.com>
* @copyright Raphael Pigulla 2015
*/
namespace OCA\Sipgate\AppInfo;
use OCP\AppFramework\App;
require __DIR__ . '/../vendor/autoload.php';
$app = new App('sipgate');
$container = $app->getContainer();
/** @var \OCP\IUserSession $userSession */
$userSession = $container->query('OCP\\IUserSession');
if ($userSession->getUser()) {
$appSettings = $container->query('OCA\\Sipgate\\Service\\AppSettings');
$appSettings->addUserId($userSession->getUser()->getUID());
}
\OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\\Sipgate\\Hooks\\UserHooks', 'postDeleteUser');
\OCP\App::registerPersonal($container->getAppName(), 'settings/settings-personal');
$container->getServer()->getJobList()->add('OCA\\Sipgate\\Cron\\FetchHistory');
$container->getServer()->getJobList()->add('OCA\\Sipgate\\Cron\\FetchItemizedEntries');
$container->getServer()->getJobList()->add('OCA\\Sipgate\\Cron\\FetchPhoneBook');
$container->getServer()->getJobList()->add('OCA\\Sipgate\\Cron\\PurgeHistory');
$container->query('OCP\\INavigationManager')->add(function () use($container) {
$urlGenerator = $container->query('OCP\\IURLGenerator');
$l10n = $container->query('OCP\\IL10N');
return ['id' => 'sipgate', 'order' => 10, 'href' => $urlGenerator->linkToRoute('sipgate.page.index'), 'icon' => $urlGenerator->imagePath('sipgate', 'app.svg'), 'name' => $l10n->t('Sipgate')];
});
示例14:
<?php
//$job = new \OCA\fc_mail_attachments\Job();
//OC::$CLASSPATH['OC_FCMA_Job'] = $job;
\OCP\App::registerPersonal('fc_mail_attachments', 'settings');
\OCP\BackgroundJob::addRegularTask('\\OCA\\fc_mail_attachments\\Job', 'run');
示例15:
<?php
/**
* ownCloud
*
* @author Michal Jaskurzynski
* @copyright 2012 Michal Jaskurzynski mjaskurzynski@gmail.com
*
*/
OC::$CLASSPATH['OCA\\mozilla_sync\\InputData'] = 'mozilla_sync/lib/inputdata.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\OutputData'] = 'mozilla_sync/lib/outputdata.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\User'] = 'mozilla_sync/lib/user.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\UrlParser'] = 'mozilla_sync/lib/urlparser.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\Utils'] = 'mozilla_sync/lib/utils.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\Storage'] = 'mozilla_sync/lib/storage.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\Service'] = 'mozilla_sync/lib/service.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\StorageService'] = 'mozilla_sync/lib/storageservice.php';
OC::$CLASSPATH['OCA\\mozilla_sync\\UserService'] = 'mozilla_sync/lib/userservice.php';
// Register Mozilla Sync for personal page
\OCP\App::registerPersonal('mozilla_sync', 'settings');
// Register Mozilla Sync for the admin page
\OCP\App::registerAdmin('mozilla_sync', 'admin');
/* vim: set ts=4 sw=4 tw=80 noet : */