本文整理汇总了PHP中OC_App::addNavigationEntry方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_App::addNavigationEntry方法的具体用法?PHP OC_App::addNavigationEntry怎么用?PHP OC_App::addNavigationEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_App
的用法示例。
在下文中一共展示了OC_App::addNavigationEntry方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OC_L10N
<?php
$l = new OC_L10N('calendar');
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
OC_HOOK::connect('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'deleteUser');
OC_Util::addScript('calendar', 'loader');
OC_App::register(array('order' => 10, 'id' => 'calendar', 'name' => 'Calendar'));
OC_App::addNavigationEntry(array('id' => 'calendar_index', 'order' => 10, 'href' => OC_Helper::linkTo('calendar', 'index.php'), 'icon' => OC_Helper::imagePath('calendar', 'icon.png'), 'name' => $l->t('Calendar')));
OC_App::registerPersonal('calendar', 'settings');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:12,代码来源:owncloud_apps_calendar_appinfo_app.php
示例2: foreach
/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC::$CLASSPATH['OC_IntBks'] = 'apps/internal_bookmarks/lib/intbks.class.php';
OC_App::register(array('order' => 70, 'id' => 'internal_bookmarks', 'name' => 'Internal Bookmarks'));
OC_Util::addScript("internal_bookmarks", "actlink.min");
$i = 0;
foreach (OC_IntBks::getAllItemsByUser() as $item) {
OC_App::addNavigationEntry(array('id' => 'internal_bookmarks_index_' . $item['bkid'], 'order' => 70 + $item['bkorder'] / 100, 'href' => OC_Helper::linkTo('files', 'index.php?dir=' . $item['bktarget']), 'icon' => OC_Helper::imagePath('internal_bookmarks', 'star_on.png'), 'name' => $item['bktitle']));
$i++;
}
if ($i > 0) {
OC_App::registerPersonal('internal_bookmarks', 'settings');
}
示例3:
<?php
/**
* register the page of admin settings form
*/
OC_App::registerAdmin('neurocloud', 'settings');
/**
* register the navigation entry
*/
OC_App::addNavigationEntry(array('id' => 'neurocloud_index', 'order' => 74, 'href' => OC_Helper::linkTo('neurocloud', 'index.php'), 'icon' => OC_Helper::imagePath('neurocloud', 'neurocloud.png'), 'name' => 'Neurocloud'));
/**
* register the classpath
*/
OC::$CLASSPATH["OC_Neurocloud"] = "apps/neurocloud/lib/hooks.php";
/**
* register the hooks for file writing
*
* NOTE: to make sure that the hooks are called everytime that a file is written, the application
* must be registered with type "filesystem". Otherwise, those hooks will be called only when uploading from the web interface
*
* to register the application as a filesystem type, put in info.xml *
* <types><filesystem/></types>
*
*/
#OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_write, "OC_Neurocloud", "beforeFileWrite");
#OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_write, "OC_Neurocloud", "afterFileWrite");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, 'post_delete', "OC_Neurocloud", "fileDeleted");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_rename, "OC_Neurocloud", "fileRenamed");
// hooks for delete/rename, do not allow deleting of directory if there is a running job
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_delete, "OC_Neurocloud", "beforeFileRenameDelete");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_rename, "OC_Neurocloud", "beforeFileRenameDelete");
示例4: OC_L10N
<?php
$l = new OC_L10N('files');
OC_App::register(array("order" => 2, "id" => "files", "name" => "Files"));
OC_App::addNavigationEntry(array("id" => "files_index", "order" => 1, "href" => OC_Helper::linkTo("files", "index.php"), "icon" => OC_Helper::imagePath("core", "places/home.svg"), "name" => $l->t("Files")));
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:5,代码来源:owncloud_files_appinfo_app.php
示例5:
<?php
OC::$CLASSPATH['OC_Contacts_Addressbook'] = 'apps/contacts/lib/addressbook.php';
OC::$CLASSPATH['OC_Contacts_VCard'] = 'apps/contacts/lib/vcard.php';
OC::$CLASSPATH['OC_Contacts_Hooks'] = 'apps/contacts/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'apps/contacts/lib/connector_sabre.php';
OC_HOOK::connect('OC_User', 'post_createUser', 'OC_Contacts_Hooks', 'deleteUser');
OC_App::register(array('order' => 10, 'id' => 'contacts', 'name' => 'Contacts'));
OC_App::addNavigationEntry(array('id' => 'contacts_index', 'order' => 10, 'href' => OC_Helper::linkTo('contacts', 'index.php'), 'icon' => OC_Helper::imagePath('settings', 'users.svg'), 'name' => 'Contacts'));
OC_APP::registerPersonal('contacts', 'settings');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:10,代码来源:owncloud_apps_contacts_appinfo_app.php
示例6: addNavigationEntry
/**
* @brief adds an entry to the navigation
* @param $data array containing the data
* @returns true/false
*
* This function adds a new entry to the navigation visible to users. $data
* is an associative array.
* The following keys are required:
* - id: unique id for this entry ('addressbook_index')
* - href: link to the page
* - name: Human readable name ('Addressbook')
*
* The following keys are optional:
* - icon: path to the icon of the app
* - order: integer, that influences the position of your application in
* the navigation. Lower values come first.
*/
public static function addNavigationEntry($data)
{
return \OC_App::addNavigationEntry($data);
}
示例7:
/**
* ownCloud - ocDownloader plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
$app_id = 'ocdownloader';
OC_Util::checkAppEnabled($app_id);
OC::$CLASSPATH['OC_ocDownloader'] = 'apps/' . $app_id . '/lib/ocDownloader.class.php';
OC::$CLASSPATH['OC_ocDownloaderFile'] = 'apps/' . $app_id . '/lib/ocDownloaderFile.class.php';
if (OC_ocDownloader::isUpToDate(OC_Appconfig::getValue($app_id, 'installed_version'))) {
OC_ocDownloader::initProviders(dirname(__FILE__) . '/providers.xml');
}
OC_App::register(array('order' => 30, 'id' => $app_id, 'name' => 'ocDownloader'));
OC_App::addNavigationEntry(array('id' => $app_id . '_index', 'order' => 30, 'href' => OC_Helper::linkTo($app_id, 'downloader.php'), 'icon' => OC_Helper::imagePath($app_id, 'dl.png'), 'name' => 'ocDownloader'));
OC_App::registerPersonal($app_id, 'personalsettings');
示例8: OC_L10N
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_Util::checkAppEnabled('storage_charts');
OC::$CLASSPATH['OC_DLStCharts'] = "apps/storage_charts/lib/db.class.php";
OC::$CLASSPATH['OC_DLStChartsLoader'] = "apps/storage_charts/lib/loader.class.php";
$l = new OC_L10N('storage_charts', OC_L10N::findLanguage(array('en', 'fr')));
OC_App::register(array('order' => 60, 'id' => 'storage_charts', 'name' => 'Storage Charts'));
OC_App::addNavigationEntry(array('id' => 'storage_charts', 'order' => 60, 'href' => OC_Helper::linkTo('storage_charts', 'charts.php'), 'icon' => OC_Helper::imagePath('storage_charts', 'chart.png'), 'name' => 'DL Charts'));
OC_App::registerPersonal('storage_charts', 'settings');
$data_dir = OC_Config::getValue('datadirectory', '');
if (OC_User::getUser() && strlen($data_dir) != 0) {
$used = OC_DLStCharts::getTotalDataSize(OC::$CONFIG_DATADIRECTORY);
$total = OC_DLStCharts::getTotalDataSize($data_dir) + OC_Filesystem::free_space();
OC_DLStCharts::update($used, $total);
}
示例9: OC_L10N
<?php
/**
* ownCloud - media plugin
*
* @author Robin Appelman
* @copyright 2010 Robin Appelman icewind1991@gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/
*
*/
$l = new OC_L10N('media');
require_once 'apps/media/lib_media.php';
OC_Util::addScript('media', 'loader');
OC_APP::registerPersonal('media', 'settings');
OC_App::register(array('order' => 3, 'id' => 'media', 'name' => 'Media'));
OC_App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo('media', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:28,代码来源:owncloud_apps_media_appinfo_app.php
示例10:
<?php
/**
* Copyright (c) 2011 Marvin Thomas Rabe <m.rabe@echtzeitraum.de>
* Copyright (c) 2011 Arthur Schiwon <blizzz@arthur-schiwon.de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
OC_App::register(array('order' => 70, 'id' => 'bookmark', 'name' => 'Bookmarks'));
OC_App::addNavigationEntry(array('id' => 'bookmarks_index', 'order' => 70, 'href' => OC_Helper::linkTo('bookmarks', 'index.php'), 'icon' => OC_Helper::imagePath('bookmarks', 'bookmarks.png'), 'name' => 'Bookmarks'));
OC_App::registerPersonal('bookmarks', 'settings');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:12,代码来源:owncloud_apps_bookmarks_appinfo_app.php