Implements the ability to have customized and configurable list views for specific content types
This commit is contained in:
@@ -15,7 +15,7 @@ using umbraco.interfaces;
|
||||
namespace Umbraco.Core.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the DataType Service, which is an easy access to operations involving <see cref="IDataType"/> and <see cref="IDataTypeDefinition"/>
|
||||
/// Represents the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
||||
/// </summary>
|
||||
public class DataTypeService : IDataTypeService
|
||||
{
|
||||
@@ -43,6 +43,19 @@ namespace Umbraco.Core.Services
|
||||
_uowProvider = provider;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||
public IDataTypeDefinition GetDataTypeDefinitionByName(string name)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateDataTypeDefinitionRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
return repository.GetByQuery(new Query<IDataTypeDefinition>().Where(x => x.Name == name)).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
||||
/// </summary>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
|
||||
@@ -6,10 +6,17 @@ using umbraco.interfaces;
|
||||
namespace Umbraco.Core.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataType"/> and <see cref="IDataTypeDefinition"/>
|
||||
/// Defines the DataType Service, which is an easy access to operations involving <see cref="IDataTypeDefinition"/>
|
||||
/// </summary>
|
||||
public interface IDataTypeService : IService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Name
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the <see cref="IDataTypeDefinition"/></param>
|
||||
/// <returns><see cref="IDataTypeDefinition"/></returns>
|
||||
IDataTypeDefinition GetDataTypeDefinitionByName(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="IDataTypeDefinition"/> by its Id
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user