本文整理汇总了PHP中OC_Defaults::getKnowledgeBaseUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Defaults::getKnowledgeBaseUrl方法的具体用法?PHP OC_Defaults::getKnowledgeBaseUrl怎么用?PHP OC_Defaults::getKnowledgeBaseUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_Defaults
的用法示例。
在下文中一共展示了OC_Defaults::getKnowledgeBaseUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSettingsNavigation
/**
* Returns the Settings Navigation
*
* @return string
*
* This function returns an array containing all settings pages added. The
* entries are sorted by the key 'order' ascending.
*/
public static function getSettingsNavigation()
{
$l = \OC::$server->getL10N('lib');
$defaults = new OC_Defaults();
$settings = array();
// by default, settings only contain the help menu
if (OC_Util::getEditionString() === '' && OC_Config::getValue('knowledgebaseenabled', true) == true) {
$settings = array(array("id" => "help", "order" => 1000, "href" => $defaults->getKnowledgeBaseUrl(), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath("settings", "help.svg")));
}
// if the user is logged-in
if (OC_User::isLoggedIn()) {
// personal menu
$settings[] = array("id" => "personal", "order" => 1, "href" => OC_Helper::linkToRoute("settings_personal"), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath("settings", "personal.svg"));
//SubAdmins are also allowed to access user management
if (OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
// admin users menu
$settings[] = array("id" => "core_users", "order" => 2, "href" => OC_Helper::linkToRoute("settings_users"), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath("settings", "users.svg"));
}
// if the user is an admin
if (OC_User::isAdminUser(OC_User::getUser())) {
// admin settings
$settings[] = array("id" => "admin", "order" => 1000, "href" => OC_Helper::linkToRoute("settings_admin"), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath("settings", "admin.svg"));
}
}
$navigation = self::proceedNavigation($settings);
return $navigation;
}