PHP Class Airship\Cabin\Bridge\Landing\Blog

Inheritance: extends LoggedInUsersOnly, use trait Airship\Engine\Bolt\Orderable
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$author Airship\Cabin\Bridge\Blueprint\Author
$blog Airship\Cabin\Bridge\Blueprint\Blog

Public Methods

Method Description
airshipLand ( ) This function is called after the dependencies have been injected by AutoPilot. Think of it as a user-land constructor.
deleteCategory ( string $id = '' ) Delete a category
deletePost ( string $id ) Delete a blog post
deleteSeries ( string $id = '' ) Delete a series.
editCategory ( string $id = '' ) Edit a category
editPost ( string $id ) Edit a blog post
editSeries ( string $seriesId )
editTag ( string $id = '' ) Edit a tag
index ( ) Blog management landing page
listCategories ( ) List the categories
listComments ( string $page = null )
listPosts ( string $page = null ) List the blog posts
listSeries ( mixed $page = null )
listTags ( mixed $page = null ) List tags
newCategory ( ) Create a new category
newPost ( ) Create a new blog post
newSeries ( ) Create a new blog series
postHistory ( string $postID = '' ) View the history for a blog post.
postHistoryDiff ( string $postID = '', string $leftUnique = '', string $rightUnique = '' ) Compare two versions of a blog post.
postHistoryView ( string $postID = '', string $uniqueID = '' ) View a version of a blog post.
viewComment ( string $commentId = '' ) View a comment

Protected Methods

Method Description
flattenOld ( array $oldItems ) : array Convert a 2D array into a flat, ordered array of type_id
getOffsetAndLimit ( string $page = null, integer $per_page ) : int[] Gets [offset, limit] based on configuration
processDeleteCategory ( integer $categoryId, array $post = [] ) : boolean Delete a blog post category
processDeletePost ( array $post, array $authorsAllowed = [], array $oldPost = [] ) : boolean Delete a blog post
processEditPost ( array $post, array $authorsAllowed = [], array $oldPost = [] ) : boolean Update a blog post
processEditSeries ( array $post, integer $seriesId, array $oldItems = [] ) : boolean Update the existing series
processEditTag ( integer $tagId, array $post ) : boolean
processNewPost ( array $post, array $authorsAllowed = [] ) : boolean Create a new blog post
processNewSeries ( array $post = [], array $authorsAllowed = [] ) : boolean Create a new series

Method Details

airshipLand() public method

This function is called after the dependencies have been injected by AutoPilot. Think of it as a user-land constructor.
public airshipLand ( )

deleteCategory() public method

Delete a category
public deleteCategory ( string $id = '' )
$id string

deletePost() public method

Delete a blog post
public deletePost ( string $id )
$id string

deleteSeries() public method

Delete a series.
public deleteSeries ( string $id = '' )
$id string

editCategory() public method

Edit a category
public editCategory ( string $id = '' )
$id string

editPost() public method

Edit a blog post
public editPost ( string $id )
$id string

editSeries() public method

public editSeries ( string $seriesId )
$seriesId string

editTag() public method

Edit a tag
public editTag ( string $id = '' )
$id string

flattenOld() protected method

Convert a 2D array into a flat, ordered array of type_id
protected flattenOld ( array $oldItems ) : array
$oldItems array
return array

getOffsetAndLimit() protected method

Gets [offset, limit] based on configuration
protected getOffsetAndLimit ( string $page = null, integer $per_page ) : int[]
$page string
$per_page integer
return int[]

index() public method

Blog management landing page
public index ( )

listCategories() public method

List the categories
public listCategories ( )

listComments() public method

public listComments ( string $page = null )
$page string

listPosts() public method

List the blog posts
public listPosts ( string $page = null )
$page string

listSeries() public method

public listSeries ( mixed $page = null )
$page mixed

listTags() public method

List tags
public listTags ( mixed $page = null )
$page mixed

newCategory() public method

Create a new category
public newCategory ( )

newPost() public method

Create a new blog post
public newPost ( )

newSeries() public method

Create a new blog series
public newSeries ( )

postHistory() public method

View the history for a blog post.
public postHistory ( string $postID = '' )
$postID string

postHistoryDiff() public method

Compare two versions of a blog post.
public postHistoryDiff ( string $postID = '', string $leftUnique = '', string $rightUnique = '' )
$postID string
$leftUnique string
$rightUnique string

postHistoryView() public method

View a version of a blog post.
public postHistoryView ( string $postID = '', string $uniqueID = '' )
$postID string
$uniqueID string

processDeleteCategory() protected method

Delete a blog post category
protected processDeleteCategory ( integer $categoryId, array $post = [] ) : boolean
$categoryId integer
$post array
return boolean

processDeletePost() protected method

Delete a blog post
protected processDeletePost ( array $post, array $authorsAllowed = [], array $oldPost = [] ) : boolean
$post array
$authorsAllowed array
$oldPost array
return boolean

processEditPost() protected method

Update a blog post
protected processEditPost ( array $post, array $authorsAllowed = [], array $oldPost = [] ) : boolean
$post array
$authorsAllowed array
$oldPost array
return boolean

processEditSeries() protected method

Update the existing series
protected processEditSeries ( array $post, integer $seriesId, array $oldItems = [] ) : boolean
$post array
$seriesId integer
$oldItems array
return boolean

processEditTag() protected method

protected processEditTag ( integer $tagId, array $post ) : boolean
$tagId integer
$post array
return boolean

processNewPost() protected method

Create a new blog post
protected processNewPost ( array $post, array $authorsAllowed = [] ) : boolean
$post array
$authorsAllowed array
return boolean

processNewSeries() protected method

Create a new series
protected processNewSeries ( array $post = [], array $authorsAllowed = [] ) : boolean
$post array
$authorsAllowed array
return boolean

viewComment() public method

View a comment
public viewComment ( string $commentId = '' )
$commentId string

Property Details

$author protected property

protected Author,Airship\Cabin\Bridge\Blueprint $author
return Airship\Cabin\Bridge\Blueprint\Author

$blog protected property

protected Blog,Airship\Cabin\Bridge\Blueprint $blog
return Airship\Cabin\Bridge\Blueprint\Blog