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

Class ListController

Provides access to Dnn Lists.

Inheritance
System.Object
ListController
Namespace: DotNetNuke.Common.Lists
Assembly: DotNetNuke.dll
Syntax
public class ListController : object

Constructors

| Improve this Doc View Source

ListController()

Initializes a new instance of the ListController class.

Declaration
public ListController()
| Improve this Doc View Source

ListController(IEventLogger)

Initializes a new instance of the ListController class.

Declaration
public ListController(IEventLogger eventLogger)
Parameters
Type Name Description
IEventLogger eventLogger

An event logger.

Fields

| Improve this Doc View Source

NonLocalizedLists

The list of list types that are not localized.

Declaration
public readonly string[] NonLocalizedLists
Field Value
Type Description
System.String[]

Properties

| Improve this Doc View Source

UnLocalizedLists

Gets the lists that do not support localization.

Declaration
public IReadOnlyCollection<string> UnLocalizedLists { get; }
Property Value
Type Description
IReadOnlyCollection<System.String>

Methods

| Improve this Doc View Source

AddListEntry(ListEntryInfo)

Adds a new list entry to the database. If the current thread locale is not "en-US" then the text value will also be persisted to a resource file under App_GlobalResources using the list's name and the value as key.

Declaration
public int AddListEntry(ListEntryInfo listEntry)
Parameters
Type Name Description
ListEntryInfo listEntry

The list entry.

Returns
Type Description
System.Int32

The entry id.

| Improve this Doc View Source

DeleteList(ListInfo, Boolean)

Deletes a list.

Declaration
public void DeleteList(ListInfo list, bool includeChildren)
Parameters
Type Name Description
ListInfo list

The ListInfo reference for the list to delete.

System.Boolean includeChildren

A value indicating wheter to also delete the children items for this list.

| Improve this Doc View Source

DeleteList(String, String, Int32)

Deletes a list.

Declaration
public void DeleteList(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The name of the list to delete.

System.String parentKey

The parent key of the list to delete.

System.Int32 portalId

The id of the site (portal) on which to delete the list.

| Improve this Doc View Source

DeleteList(String, String)

Deletes a list.

Declaration
public void DeleteList(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The name of the list to delete.

System.String parentKey

The parent key for the list to delete.

| Improve this Doc View Source

DeleteListEntryByID(Int32, Boolean)

Deletes a list entry.

Declaration
public void DeleteListEntryByID(int entryId, bool deleteChild)
Parameters
Type Name Description
System.Int32 entryId

the id of the entry to delete.

System.Boolean deleteChild

A value indicating whether to also delete the children of that item.

| Improve this Doc View Source

DeleteListEntryByListName(String, String, Boolean)

Deletes a list entry by its name.

Declaration
public void DeleteListEntryByListName(string listName, string listValue, bool deleteChild)
Parameters
Type Name Description
System.String listName

The name of the list entry.

System.String listValue

The value of the list entry.

System.Boolean deleteChild

A value indicating whether to also delete the children of that item.

| Improve this Doc View Source

GetListEntryInfo(Int32)

Gets a list entry information.

Declaration
public ListEntryInfo GetListEntryInfo(int entryId)
Parameters
Type Name Description
System.Int32 entryId

The id of the list entry.

Returns
Type Description
ListEntryInfo

ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfo(String, Int32)

Gets a list entry information.

Declaration
public ListEntryInfo GetListEntryInfo(string listName, int entryId)
Parameters
Type Name Description
System.String listName

The name of the list.

System.Int32 entryId

The id of the list entry.

Returns
Type Description
ListEntryInfo

ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfo(String, String)

Gets a list entry information.

Declaration
public ListEntryInfo GetListEntryInfo(string listName, string listValue)
Parameters
Type Name Description
System.String listName

The name of the list.

System.String listValue

The value of the list entry.

Returns
Type Description
ListEntryInfo

ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfoCollection(String, String, Int32)

Gets a collection of list entries.

Declaration
public ListEntryInfoCollection GetListEntryInfoCollection(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The name of the list to get.

System.String parentKey

The parent key.

System.Int32 portalId

The id of the site (portal) to get the list from.

Returns
Type Description
ListEntryInfoCollection

A collection of list entries.

| Improve this Doc View Source

GetListEntryInfoCollection(String, String)

Gets a collection of list entries.

Declaration
public ListEntryInfoCollection GetListEntryInfoCollection(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The name of the list to get.

System.String parentKey

The parent key.

Returns
Type Description
ListEntryInfoCollection

A collection of list entries.

| Improve this Doc View Source

GetListEntryInfoCollection(String)

Gets a collection of list entries.

Declaration
public ListEntryInfoCollection GetListEntryInfoCollection(string listName)
Parameters
Type Name Description
System.String listName

The name of the list to get.

Returns
Type Description
ListEntryInfoCollection

A collection of list entries.

| Improve this Doc View Source

GetListEntryInfoDictionary(String, String, Int32)

Gets all list entries for a given list name.

Declaration
public Dictionary<string, ListEntryInfo> GetListEntryInfoDictionary(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The name of the list to get.

System.String parentKey

The parent key.

System.Int32 portalId

The id of the site (portal) from which to get the list entries from.

Returns
Type Description
Dictionary<System.String, ListEntryInfo>

A dictionary where the index is Key and the value is the actual ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfoDictionary(String, String)

Gets all list entries for a given list name.

Declaration
public Dictionary<string, ListEntryInfo> GetListEntryInfoDictionary(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The name of the list to get.

System.String parentKey

The parent key.

Returns
Type Description
Dictionary<System.String, ListEntryInfo>

A dictionary where the index is Key and the value is the actual ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfoDictionary(String)

Gets all list entries for a given list name.

Declaration
public Dictionary<string, ListEntryInfo> GetListEntryInfoDictionary(string listName)
Parameters
Type Name Description
System.String listName

The name of the list to get.

Returns
Type Description
Dictionary<System.String, ListEntryInfo>

A dictionary where the index is Key and the value is the actual ListEntryInfo.

| Improve this Doc View Source

GetListEntryInfoItems(String, String, Int32)

Gets the entries in a child list.

Declaration
public IEnumerable<ListEntryInfo> GetListEntryInfoItems(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The list name.

System.String parentKey

The parent key.

System.Int32 portalId

The id of the site (portal) from which to get the list from.

Returns
Type Description
IEnumerable<ListEntryInfo>

An enumeration of list entries.

| Improve this Doc View Source

GetListEntryInfoItems(String, String)

Gets the entries in a child list.

Declaration
public IEnumerable<ListEntryInfo> GetListEntryInfoItems(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The list name.

System.String parentKey

The parent key.

Returns
Type Description
IEnumerable<ListEntryInfo>

An enumeration of list entries.

| Improve this Doc View Source

GetListEntryInfoItems(String)

Gets the entries in the list with the given listName.

Declaration
public IEnumerable<ListEntryInfo> GetListEntryInfoItems(string listName)
Parameters
Type Name Description
System.String listName

The name of the list.

Returns
Type Description
IEnumerable<ListEntryInfo>

An enumeration of list entries.

| Improve this Doc View Source

GetListInfo(String, String, Int32)

Gets a single list.

Declaration
public ListInfo GetListInfo(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The name of the list.

System.String parentKey

The parent key.

System.Int32 portalId

The id of the site (portal) to get the list from.

Returns
Type Description
ListInfo

ListInfo.

| Improve this Doc View Source

GetListInfo(String, String)

Gets a single list.

Declaration
public ListInfo GetListInfo(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The name of the list.

System.String parentKey

The parent key.

Returns
Type Description
ListInfo

ListInfo.

| Improve this Doc View Source

GetListInfo(String)

Gets a single list.

Declaration
public ListInfo GetListInfo(string listName)
Parameters
Type Name Description
System.String listName

The name of the list.

Returns
Type Description
ListInfo

ListInfo.

| Improve this Doc View Source

GetListInfoCollection()

Gets a collection of lists.

Declaration
public ListInfoCollection GetListInfoCollection()
Returns
Type Description
ListInfoCollection

ListInfoCollection.

| Improve this Doc View Source

GetListInfoCollection(String, String, Int32)

Gets a collection of lists.

Declaration
public ListInfoCollection GetListInfoCollection(string listName, string parentKey, int portalId)
Parameters
Type Name Description
System.String listName

The list name.

System.String parentKey

The parent key.

System.Int32 portalId

The id of the site (portal) to get the list from.

Returns
Type Description
ListInfoCollection

ListInfoCollection.

| Improve this Doc View Source

GetListInfoCollection(String, String)

Gets a collection of lists.

Declaration
public ListInfoCollection GetListInfoCollection(string listName, string parentKey)
Parameters
Type Name Description
System.String listName

The list name.

System.String parentKey

The parent key.

Returns
Type Description
ListInfoCollection

ListInfoCollection.

| Improve this Doc View Source

GetListInfoCollection(String)

Gets a collection of lists.

Declaration
public ListInfoCollection GetListInfoCollection(string listName)
Parameters
Type Name Description
System.String listName

The list name.

Returns
Type Description
ListInfoCollection

ListInfoCollection.

| Improve this Doc View Source

UpdateListEntry(ListEntryInfo)

Updates the list entry in the database using the values set on the listEntry. Note that if the current thread locale is not "en-US" then the text value will be persisted to a resource file under App_GlobalResources using the list's name and the value as key. Also the supplied text value will not be written to the database in this case (i.e. we expect the text value in the database to be the en-US text value).

Declaration
public void UpdateListEntry(ListEntryInfo listEntry)
Parameters
Type Name Description
ListEntryInfo listEntry

The list entry info item to update.

| Improve this Doc View Source

UpdateListSortOrder(Int32, Boolean)

Updates a list sort order.

Declaration
public void UpdateListSortOrder(int entryID, bool moveUp)
Parameters
Type Name Description
System.Int32 entryID

The id of the entry to move.

System.Boolean moveUp

The entry is moved up if true or moved down if false.

Extension Methods

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