Method | Description | |
---|---|---|
GetIfExists ( ) : Umbraco.Core.Models.IContent |
Gets the IContent instance if it exists, otherwise returns null
|
|
GetOrCreate ( ) : Umbraco.Core.Models.IContent |
Gets the IContent instance if it already exists, otherwise creates it
|
|
GetPublishedIfExists ( ) : IPublishedContent |
Gets the IPublishedContent instance if it exists, otherwise returns null
|
Method | Description | |
---|---|---|
ContentFactoryBase ( DocumentTypeBase values ) : System |
Creates an instance of a document type using values supplied as a strongly-typed model. The RootContentFactory and ChildContentFactory[T] implementations work with the IAutoContent interface and the [AutoContent] attribute to place the content creation logic into methods on the code-first document type model. The recommended approach for content creation is to implement IAutoContent on the document type model and apply an [AutoContent] attribute to the document type model. Implementing a custom factory may be required for some scenarios such as creating a collection of content items or creating a nested structure in a single factory. A custom factory type can be specified using a [ContentFactory] attribute.
|
|
GetIfExists ( IEnumerable |
Gets the IContent instance if it exists, otherwise returns null
|
|
GetOrCreate ( int parentId ) : Umbraco.Core.Models.IContent |
Gets the IContent instance if it already exists, otherwise creates it
|
|
GetPublishedIfExists ( IEnumerable |
Gets the IPublishedContent instance if it exists, otherwise returns null
|
protected ContentFactoryBase ( DocumentTypeBase values ) : System | ||
values | DocumentTypeBase | The values to use to create the document |
return | System |
public abstract GetIfExists ( ) : Umbraco.Core.Models.IContent | ||
return | Umbraco.Core.Models.IContent |
protected GetIfExists ( IEnumerable |
||
rootContent | IEnumerable |
The collection of content to search for the existing node. |
return | Umbraco.Core.Models.IContent |
public abstract GetOrCreate ( ) : Umbraco.Core.Models.IContent | ||
return | Umbraco.Core.Models.IContent |
protected GetOrCreate ( int parentId ) : Umbraco.Core.Models.IContent | ||
parentId | int | The ID of the parent node |
return | Umbraco.Core.Models.IContent |
public abstract GetPublishedIfExists ( ) : IPublishedContent | ||
return | IPublishedContent |
protected GetPublishedIfExists ( IEnumerable |
||
rootContent | IEnumerable |
The collection of content to search for the existing node. |
return | IPublishedContent |