Files
Umbraco-CMS/src/Umbraco.Web/ContentApps/ContentAppDefinitionCollection.cs

21 lines
606 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Models.ContentEditing;
namespace Umbraco.Web.ContentApps
{
public class ContentAppDefinitionCollection : BuilderCollectionBase<IContentAppDefinition>
{
public ContentAppDefinitionCollection(IEnumerable<IContentAppDefinition> items)
: base(items)
{ }
public IEnumerable<ContentApp> GetContentAppsFor(object o)
{
2018-09-21 09:42:36 +02:00
return this.Select(x => x.GetContentAppFor(o)).WhereNotNull().OrderBy(x => x.Weight);
}
}
}