Rock.Model.EntityTypeService.GetReportableEntities C# (CSharp) Метод

GetReportableEntities() публичный Метод

Gets an enumerable collection of EntityTypes where the IsEntity flag is set to true, person is Authorized to View, and EntityType isn't HideFromReporting
public GetReportableEntities ( Person currentPerson ) : IEnumerable
currentPerson Person The current person.
Результат IEnumerable
        public IEnumerable<EntityType> GetReportableEntities(Person currentPerson)
        {
            return this.GetEntities()
                .Where( a => a.IsAuthorized( Rock.Security.Authorization.VIEW, currentPerson ) )
                .Select( s => new
                {
                    EntityTypeCache = Rock.Web.Cache.EntityTypeCache.Read( s ),
                    Entity = s,
                } )
                .Where( a => a.EntityTypeCache != null && a.EntityTypeCache.GetEntityType() != null && !a.EntityTypeCache.GetEntityType().GetCustomAttributes( typeof( HideFromReportingAttribute ), true ).Any() )
                .Select( s => s.Entity );
        }