本文整理汇总了TypeScript中@core/contentlinks/providers/helper.CoreContentLinksHelperProvider类的典型用法代码示例。如果您正苦于以下问题:TypeScript CoreContentLinksHelperProvider类的具体用法?TypeScript CoreContentLinksHelperProvider怎么用?TypeScript CoreContentLinksHelperProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CoreContentLinksHelperProvider类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
messagesProvider.isGroupMessagingEnabledInSite(notification.site).then((enabled) => {
let pageName = 'AddonMessagesIndexPage';
if (enabled) {
pageName = 'AddonMessagesGroupConversationsPage';
}
linkHelper.goInSite(undefined, pageName, undefined, notification.site);
});
示例2: open
/**
* Opens a URL.
*
* @param {string} url The URL to go to.
*/
open(url: string): void {
const modal = this.domUtils.showModalLoading();
this.contentLinksHelper.handleLink(url).then((treated) => {
if (!treated) {
return this.sitesProvider.getCurrentSite().openInBrowserWithAutoLoginIfSameSite(url);
}
}).finally(() => {
modal.dismiss();
});
}
示例3: Number
messagesProvider.isGroupMessagingEnabledInSite(notification.site).then((enabled) => {
const pageParams: any = {};
let pageName = 'AddonMessagesIndexPage';
if (enabled) {
pageName = 'AddonMessagesGroupConversationsPage';
}
// Check if we have enough information to open the conversation.
if (notification.convid && enabled) {
pageParams.conversationId = Number(notification.convid);
} else if (notification.userfromid) {
pageParams.discussionUserId = Number(notification.userfromid);
}
linkHelper.goInSite(undefined, pageName, pageParams, notification.site);
});
示例4:
notificationsProvider.invalidateNotificationsList().finally(() => {
linkHelper.goInSite(undefined, 'AddonNotificationsListPage', undefined, notification.site);
});
示例5:
}).then(() => {
linkHelper.goInSite(undefined, 'AddonModForumDiscussionPage', pageParams, notification.site);
});
示例6:
messagesProvider.invalidateDiscussionsCache(notification.site).finally(() => {
linkHelper.goInSite(undefined, 'AddonMessagesIndexPage', undefined, notification.site);
});