C# Class Piranha.Models.Manager.ContentModels.EditModel

Edit model for the content record.
Show file Open project: PiranhaCMS/Piranha Class Usage Examples

Private Properties

Property Type Description
GetMetaData void
SortFolders List

Public Methods

Method Description
DeleteAll ( ) : bool

Deletes the specified content and its related file.

EditModel ( ) : System

Default constructor. Creates a new model.

EditModel ( bool isfolder, System.Guid parentid ) : System

Default constructor. Creates a new model.

GetById ( System.Guid id ) : EditModel

Gets the edit model for the content with the given id.

Refresh ( ) : void

Refreshes the current object.

SaveAll ( bool draft ) : bool

Saves the edit model.

Sync ( string url = "" ) : bool

Syncronizes the media object from the original url.

Private Methods

Method Description
GetMetaData ( ) : void
SortFolders ( List media, int level = 1 ) : List

Flattens the folder structure.

Method Details

DeleteAll() public method

Deletes the specified content and its related file.
public DeleteAll ( ) : bool
return bool

EditModel() public method

Default constructor. Creates a new model.
public EditModel ( ) : System
return System

EditModel() public method

Default constructor. Creates a new model.
public EditModel ( bool isfolder, System.Guid parentid ) : System
isfolder bool Whether this is a folder or not.
parentid System.Guid
return System

GetById() public static method

Gets the edit model for the content with the given id.
public static GetById ( System.Guid id ) : EditModel
id System.Guid The content id
return EditModel

Refresh() public method

Refreshes the current object.
public Refresh ( ) : void
return void

SaveAll() public method

Saves the edit model.
public SaveAll ( bool draft ) : bool
draft bool
return bool

Sync() public method

Syncronizes the media object from the original url.
public Sync ( string url = "" ) : bool
url string
return bool