• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ContentController

Inheritance
System.Object
ServiceLocator<IContentController, ContentController>
ContentController
Implements
IContentController
Inherited Members
ServiceLocator<IContentController, ContentController>.Instance
ServiceLocator<IContentController, ContentController>.Factory
ServiceLocator<IContentController, ContentController>.SetTestableInstance(IContentController)
ServiceLocator<IContentController, ContentController>.ClearInstance()
ServiceLocator<IContentController, ContentController>.GetFactory()
Namespace: DotNetNuke.Entities.Content
Assembly: DotNetNuke.dll
Syntax
public class ContentController : ServiceLocator<IContentController, ContentController>, IContentController

Constructors

| Improve this Doc View Source

ContentController()

Initializes a new instance of the ContentController class.

Declaration
public ContentController()
| Improve this Doc View Source

ContentController(IDataService)

Initializes a new instance of the ContentController class.

Declaration
public ContentController(IDataService dataService)
Parameters
Type Name Description
IDataService dataService

The data service.

Methods

| Improve this Doc View Source

AddContentItem(ContentItem)

Adds the content item.

Declaration
public int AddContentItem(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

Returns
Type Description
System.Int32

content item id.

| Improve this Doc View Source

AddMetaData(ContentItem, String, String)

Adds the meta data.

Declaration
public void AddMetaData(ContentItem contentItem, string name, string value)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.String name

The name.

System.String value

The value.

| Improve this Doc View Source

DeleteContentItem(ContentItem)

Deletes the content item.

Declaration
public void DeleteContentItem(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

| Improve this Doc View Source

DeleteContentItem(Int32)

Delete a ContentItem object by ID.

Declaration
public void DeleteContentItem(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The ID of the ContentItem object (ContentItemId).

| Improve this Doc View Source

DeleteMetaData(ContentItem, String, String)

Deletes the meta data.

Declaration
public void DeleteMetaData(ContentItem contentItem, string name, string value)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.String name

The name.

System.String value

The value.

| Improve this Doc View Source

DeleteMetaData(ContentItem, String)

Similar to DeleteMetaData that requires a value, but this one looks it up for you.

Declaration
public void DeleteMetaData(ContentItem contentItem, string name)
Parameters
Type Name Description
ContentItem contentItem
System.String name
| Improve this Doc View Source

GetContentItem(Int32)

Gets the content item.

Declaration
public ContentItem GetContentItem(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
ContentItem

content item.

| Improve this Doc View Source

GetContentItems(Int32, Int32, Int32)

Declaration
public IQueryable<ContentItem> GetContentItems(int contentTypeId, int tabId, int moduleId)
Parameters
Type Name Description
System.Int32 contentTypeId
System.Int32 tabId
System.Int32 moduleId
Returns
Type Description
IQueryable<ContentItem>
| Improve this Doc View Source

GetContentItemsByContentType(ContentType)

Get a list of content items by ContentType.

Declaration
public IQueryable<ContentItem> GetContentItemsByContentType(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

The Content Type of the content items we want to query.

Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByContentType(Int32)

Get a list of content items by ContentType ID.

Declaration
public IQueryable<ContentItem> GetContentItemsByContentType(int contentTypeId)
Parameters
Type Name Description
System.Int32 contentTypeId

The Content Type ID of the content items we want to query.

Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByModuleId(Int32)

Retrieve all content items associated with the specified module ID, moduleId.

Declaration
public IQueryable<ContentItem> GetContentItemsByModuleId(int moduleId)
Parameters
Type Name Description
System.Int32 moduleId

The module ID to use in the content item lookup.

Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByTabId(Int32)

Retrieve all content items on the specified page (tab).

Declaration
public IQueryable<ContentItem> GetContentItemsByTabId(int tabId)
Parameters
Type Name Description
System.Int32 tabId

The page ID to use in the lookup of content items.

Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByTerm(Term)

Return ContentItems that have the specified term attached.

Declaration
public IQueryable<ContentItem> GetContentItemsByTerm(Term term)
Parameters
Type Name Description
Term term
Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByTerm(String)

Return ContentItems that have the specified term attached.

Declaration
public IQueryable<ContentItem> GetContentItemsByTerm(string term)
Parameters
Type Name Description
System.String term
Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByTerms(IList<Term>)

Return a list of ContentItems that have all of the specified terms attached.

Declaration
public IQueryable<ContentItem> GetContentItemsByTerms(IList<Term> terms)
Parameters
Type Name Description
IList<Term> terms

A list of terms that should be attached to the ContentItems returned.

Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByTerms(String[])

Return a list of ContentItems that have all of the specified terms attached.

Declaration
public IQueryable<ContentItem> GetContentItemsByTerms(string[] terms)
Parameters
Type Name Description
System.String[] terms
Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetContentItemsByVocabularyId(Int32)

Get a list of content items tagged with terms from the specified Vocabulary ID.

Declaration
public IQueryable<ContentItem> GetContentItemsByVocabularyId(int vocabularyId)
Parameters
Type Name Description
System.Int32 vocabularyId
Returns
Type Description
IQueryable<ContentItem>

A queryable sequence of ContentItem instances.

| Improve this Doc View Source

GetFactory()

Gets the service locator factory.

Declaration
protected override Func<IContentController> GetFactory()
Returns
Type Description
Func<IContentController>

A factory function.

Overrides
DotNetNuke.Framework.ServiceLocator<DotNetNuke.Entities.Content.IContentController, DotNetNuke.Entities.Content.ContentController>.GetFactory()
| Improve this Doc View Source

GetMetaData(Int32)

Gets the meta data.

Declaration
public NameValueCollection GetMetaData(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
NameValueCollection

A containing the content item's metadata.

| Improve this Doc View Source

GetUnIndexedContentItems()

Gets the un indexed content items.

Declaration
public IQueryable<ContentItem> GetUnIndexedContentItems()
Returns
Type Description
IQueryable<ContentItem>

content item collection.

| Improve this Doc View Source

UpdateContentItem(ContentItem)

Updates the content item.

Declaration
public void UpdateContentItem(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

Implements

IContentController

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS