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

Class TermController

The Main Business layer of Taxonomy.

Inheritance
System.Object
TermController
Implements
ITermController
Namespace: DotNetNuke.Entities.Content.Taxonomy
Assembly: DotNetNuke.dll
Syntax
public class TermController : object, ITermController
Examples
internal static List<Term> GetTerms(this Vocabulary voc, int vocabularyId)
{
    ITermController ctl = Util.GetTermController();
    return ctl.GetTermsByVocabulary(vocabularyId).ToList();
}

Constructors

| Improve this Doc View Source

TermController()

Initializes a new instance of the TermController class.

Declaration
public TermController()
| Improve this Doc View Source

TermController(IDataService)

Initializes a new instance of the TermController class.

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

Methods

| Improve this Doc View Source

AddTerm(Term)

Adds the term.

Declaration
public int AddTerm(Term term)
Parameters
Type Name Description
Term term

The term.

Returns
Type Description
System.Int32

term id.

| Improve this Doc View Source

AddTermToContent(Term, ContentItem)

Adds the content of the term to.

Declaration
public void AddTermToContent(Term term, ContentItem contentItem)
Parameters
Type Name Description
Term term

The term.

ContentItem contentItem

The content item.

| Improve this Doc View Source

DeleteTerm(Term)

Deletes the term.

Declaration
public void DeleteTerm(Term term)
Parameters
Type Name Description
Term term

The term.

| Improve this Doc View Source

GetTerm(Int32)

Gets the term.

Declaration
public Term GetTerm(int termId)
Parameters
Type Name Description
System.Int32 termId

The term id.

Returns
Type Description
Term

specific term.

| Improve this Doc View Source

GetTermsByContent(Int32)

Gets the content of the terms by content item id.

Declaration
public IQueryable<Term> GetTermsByContent(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
IQueryable<Term>

term collection.

| Improve this Doc View Source

GetTermsByVocabulary(Int32)

Gets the terms by vocabulary id.

Declaration
public IQueryable<Term> GetTermsByVocabulary(int vocabularyId)
Parameters
Type Name Description
System.Int32 vocabularyId

The vocabulary id.

Returns
Type Description
IQueryable<Term>

term collection.

| Improve this Doc View Source

GetTermsByVocabulary(String)

Gets the terms by vocabulary name.

Declaration
public IQueryable<Term> GetTermsByVocabulary(string vocabularyName)
Parameters
Type Name Description
System.String vocabularyName

Name of the vocabulary.

Returns
Type Description
IQueryable<Term>

term collection.

| Improve this Doc View Source

GetTermUsage(Int32)

Retrieve usage data for the specified term ID.

Declaration
public TermUsage GetTermUsage(int termId)
Parameters
Type Name Description
System.Int32 termId

Term ID in question.

Returns
Type Description
TermUsage

A TermUsage instance or null.

| Improve this Doc View Source

RemoveTermsFromContent(ContentItem)

Removes all terms from content item.

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

The content item.

| Improve this Doc View Source

UpdateTerm(Term)

Updates the term.

Declaration
public void UpdateTerm(Term term)
Parameters
Type Name Description
Term term

The term.

Implements

ITermController

Extension Methods

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