Table of Contents

Class FieldTypeService

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
public class FieldTypeService : ICacheStorage<int, FieldType>, ICacheStorage<int>, ICacheStorage
Inheritance
FieldTypeService
Implements
Inherited Members

Methods

ClearCache()

Clears the field types cache

public void ClearCache()

ClearCache(IEnumerable<int>)

Resets the specified keys to the default value for objects stored in the object cache

public void ClearCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

Keys to reset

ClearCache(int)

Resets the specified key to the default value for objects stored in the object cache

public void ClearCache(int key)

Parameters

key int

Key to reset

Delete(int)

Delete the field type from the database

public void Delete(int id)

Parameters

id int

The id of the field type, which should be deleted

GetById(int)

Gets the field type by id

public FieldType GetById(int id)

Parameters

id int

The id of the field type

Returns

FieldType

The FieldType object

GetByName(string)

public FieldType GetByName(string typename)

Parameters

typename string

Returns

FieldType

GetFieldTypes(bool)

Load custom field types

public IEnumerable<FieldType> GetFieldTypes(bool showAdvanced)

Parameters

showAdvanced bool

Include or not advanced types

Returns

IEnumerable<FieldType>

Collection of FieldType objects

GetTypeName(FieldType)

Gives the english names of the field type for the standard ones and returns the non-translated name for all non-standard field types

public static string GetTypeName(FieldType fieldType)

Parameters

fieldType FieldType

The field type with the name which will be mapped

Returns

string

The english name of the field type if the field type is standard, otherwise it will just return the name of the field type

IsUsed(int)

Checks if the current field type is used in either OrderField, ProductField, GroupField or ProductCategoryField

public bool IsUsed(int id)

Parameters

id int

The id of the field type to check if used

Returns

bool

true if the field type is used on a field otherwise false

Save(FieldType)

Saves the field type object in the database

public int Save(FieldType fieldType)

Parameters

fieldType FieldType

The field type object to be saved

Returns

int

The identity of the database row which was inserted

To top