Added IsPublished(culture) to IPublishedContent

This commit is contained in:
Bjarke Berg
2019-01-23 07:54:45 +01:00
parent 78319bae9e
commit e871392405
13 changed files with 63 additions and 13 deletions

View File

@@ -153,8 +153,12 @@ namespace Umbraco.Core.Models.PublishedContent
/// </remarks>
bool IsDraft(string culture = null);
// fixme/task - consider having an IsPublished flag too
// so that when IsDraft is true, we can check whether there is a published version?
/// <summary>
/// Gets a value indicating whether the content is published.
/// </summary>
/// <param name="culture"></param>
bool IsPublished(string culture = null);
#endregion

View File

@@ -111,6 +111,10 @@ namespace Umbraco.Core.Models.PublishedContent
/// <inheritdoc />
public virtual bool IsDraft(string culture = null) => _content.IsDraft(culture);
/// <inheritdoc />
public virtual bool IsPublished(string culture = null) => _content.IsPublished(culture);
#endregion
#region Tree