C# Class Roadkill.Core.Mvc.ViewModels.PageViewModel

Show file Open project: LocalGovDigital/pipeline Class Usage Examples

Private Properties

Property Type Description
GetAppSettings Roadkill.Core.Configuration.ApplicationSettings
ParseRawTags void

Public Methods

Method Description
Activity ( ) : List
CommaDelimitedTags ( ) : string

Joins the parsed tags with a comma.

EncodePageTitle ( string title ) : string

Removes all bad characters (ones which cannot be used in a URL for a page) from a page title.

GetRelationships ( ) : List
JavascriptArrayForAllTags ( ) : string

Formats the AllTags to insert inside an array initializer like [];

PageViewModel ( ) : System
PageViewModel ( Roadkill.Core.Database.Page page ) : System
PageViewModel ( PageContent pageContent, Roadkill.Core.Converters.MarkupConverter converter ) : System
ParseTags ( string tags ) : IEnumerable

Takes a string of tags: "tagone,tagtwo,tag3 " and returns a list.

RelToUserToPage ( int pageID ) : Relationship

Returns if this user has already added a relationship to this page

SpaceDelimitedTags ( ) : string

Joins the tags with a space.

VerifyRawTags ( PageViewModel pageViewModel, System.ComponentModel.DataAnnotations.ValidationContext context ) : System.ComponentModel.DataAnnotations.ValidationResult

Returns false if the tag contains ; / ? : @ & = { } | \ ^ [ ] `

Private Methods

Method Description
GetAppSettings ( ) : Roadkill.Core.Configuration.ApplicationSettings
ParseRawTags ( ) : void

Method Details

Activity() public method

public Activity ( ) : List
return List

CommaDelimitedTags() public method

Joins the parsed tags with a comma.
public CommaDelimitedTags ( ) : string
return string

EncodePageTitle() public static method

Removes all bad characters (ones which cannot be used in a URL for a page) from a page title.
public static EncodePageTitle ( string title ) : string
title string
return string

GetRelationships() public method

public GetRelationships ( ) : List
return List

JavascriptArrayForAllTags() public method

Formats the AllTags to insert inside an array initializer like [];
public JavascriptArrayForAllTags ( ) : string
return string

PageViewModel() public method

public PageViewModel ( ) : System
return System

PageViewModel() public method

public PageViewModel ( Roadkill.Core.Database.Page page ) : System
page Roadkill.Core.Database.Page
return System

PageViewModel() public method

public PageViewModel ( PageContent pageContent, Roadkill.Core.Converters.MarkupConverter converter ) : System
pageContent Roadkill.Core.Database.PageContent
converter Roadkill.Core.Converters.MarkupConverter
return System

ParseTags() public static method

Takes a string of tags: "tagone,tagtwo,tag3 " and returns a list.
public static ParseTags ( string tags ) : IEnumerable
tags string
return IEnumerable

RelToUserToPage() public method

Returns if this user has already added a relationship to this page
public RelToUserToPage ( int pageID ) : Relationship
pageID int
return Roadkill.Core.Database.Relationship

SpaceDelimitedTags() public method

Joins the tags with a space.
public SpaceDelimitedTags ( ) : string
return string

VerifyRawTags() public static method

Returns false if the tag contains ; / ? : @ & = { } | \ ^ [ ] `
public static VerifyRawTags ( PageViewModel pageViewModel, System.ComponentModel.DataAnnotations.ValidationContext context ) : System.ComponentModel.DataAnnotations.ValidationResult
pageViewModel PageViewModel
context System.ComponentModel.DataAnnotations.ValidationContext
return System.ComponentModel.DataAnnotations.ValidationResult