コード例 #1
0
        public IList<CmsContentType> GetContentTypes(Data.Guid siteGuid, ContentTypeFilter filter)
        {
            CmsContentTypeDao dao = new CmsContentTypeDao();

            List<CmsContentType> results = new List<CmsContentType>();
            if (filter == ContentTypeFilter.IncludeGlobalTypes)
            {
                IList<CmsContentType> global = dao.FindGlobalContentTypes();
                if (global != null)
                    results.AddRange(global);
            }

            IList<CmsContentType> local = dao.FindBySite(siteGuid);
            if (local != null)
                results.AddRange(local);

            return results;
        }