mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 10:07:55 +08:00

See http://orchard.codeplex.com/WorkItem/View.aspx?WorkItemId=16417 We considering the list of conflicting slug, we should ignore the current content item... --HG-- branch : dev
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Orchard.Core.Common.Models;
|
|
|
|
namespace Orchard.Core.Common.Services {
|
|
public interface IRoutableService : IDependency {
|
|
void FillSlug<TModel>(TModel model) where TModel : RoutableAspect;
|
|
void FillSlug<TModel>(TModel model, Func<string, string> generateSlug) where TModel : RoutableAspect;
|
|
string GenerateUniqueSlug(string slugCandidate, IEnumerable<string> existingSlugs);
|
|
|
|
/// <summary>
|
|
/// Returns any content item of the specified content type with similar slugs
|
|
/// </summary>
|
|
IEnumerable<RoutableAspect> GetSimilarSlugs(string contentType, string slug);
|
|
|
|
/// <summary>
|
|
/// Validates the given slug
|
|
/// </summary>
|
|
bool IsSlugValid(string slug);
|
|
|
|
/// <summary>
|
|
/// Defines the slug of a RoutableAspect and validate its unicity
|
|
/// </summary>
|
|
/// <returns>True if the slug has been created, False if a conflict occured</returns>
|
|
bool ProcessSlug(RoutableAspect part);
|
|
|
|
}
|
|
} |