-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
source/nuPickers/Extensions/IPublishedContentExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace nuPickers.Extensions | ||
{ | ||
using Umbraco.Core.Models; | ||
|
||
public static class IPublishedContentExtensions | ||
{ | ||
/// <summary> | ||
/// Get a Picker model for the supplied propertyAlias on this <see cref="IPublishedContent"/> | ||
/// </summary> | ||
/// <param name="publishedContent"></param> | ||
/// <param name="propertyAlias"></param> | ||
/// <returns></returns> | ||
public static Picker GetPicker(this IPublishedContent publishedContent, string propertyAlias) | ||
{ | ||
return new Picker(publishedContent.Id, propertyAlias); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters