PHP Class Airship\Cabin\Bridge\Landing\PageManager

Inheritance: extends LoggedInUsersOnly, use trait Get
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$pg Airship\Cabin\Bridge\Blueprint\CustomPages

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.
deleteDir ( string $cabin = '' ) Delete a directory in the custom page system
deletePage ( string $cabin = '' )
editPage ( string $cabin = '' ) We're going to edit a directory
forCabin ( string $cabin = '' ) List all of the subdirectories and custom pages in a given directory
index ( ) Serve the index page
newDir ( string $cabin = '' ) We're going to create a directory
newPage ( string $cabin = '' ) Create a new page
pageHistory ( string $cabin = '' ) We're going to view a page's history
pageHistoryDiff ( string $cabin, string $leftUnique, string $rightUnique ) We're going to view a page's history
pageHistoryView ( string $cabin, string $uniqueId ) We're going to view a page's history
renameDir ( string $cabin ) We're going to move/rename a directory
renamePage ( string $cabin ) We're going to create a directory

Protected Methods

Method Description
detectCollisions ( string $uri, string $cabin ) : boolean Find probable collisions between patterns and cabin names, as well as hard-coded paths in the current cabin. It does NOT look for collisions in custom pages, nor in page collisions in foreign Cabins (outside of the Cabin itself).
determinePath ( string &$cabin ) : string Business logic.
processDeleteDir ( integer $targetID, array $post = [], string $oldCabin = '', array $cabins = [] ) : boolean
processDeletePage ( integer $pageId, array $post = [], string $cabin = '', string $dir = '' ) : boolean Confirm deletion
processEditPage ( integer $pageId, array $post = [], string $cabin = '', string $dir = '' ) : boolean Create a new page in the current directory
processMoveDir ( array $dirInfo, array $post = [], string $oldCabin = '', array $cabins = [] ) : boolean Move/rename a directory.
processMovePage ( array $page, array $post, string $cabin, string $dir ) : boolean Move a page
processNewDir ( string $cabin, string $parent, array $post = [] ) : boolean
processNewPage ( string $cabin, string $path, array $post = [] ) : boolean Create a new page in the current directory
setTemplateExtraData ( string $cabin ) Set the cabin links

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 ( )

deleteDir() public method

Delete a directory in the custom page system
public deleteDir ( string $cabin = '' )
$cabin string

deletePage() public method

public deletePage ( string $cabin = '' )
$cabin string

detectCollisions() protected method

Find probable collisions between patterns and cabin names, as well as hard-coded paths in the current cabin. It does NOT look for collisions in custom pages, nor in page collisions in foreign Cabins (outside of the Cabin itself).
protected detectCollisions ( string $uri, string $cabin ) : boolean
$uri string
$cabin string
return boolean

determinePath() protected method

Business logic.
protected determinePath ( string &$cabin ) : string
$cabin string
return string

editPage() public method

We're going to edit a directory
public editPage ( string $cabin = '' )
$cabin string

forCabin() public method

List all of the subdirectories and custom pages in a given directory
public forCabin ( string $cabin = '' )
$cabin string

index() public method

Serve the index page
public index ( )

newDir() public method

We're going to create a directory
public newDir ( string $cabin = '' )
$cabin string

newPage() public method

Create a new page
public newPage ( string $cabin = '' )
$cabin string

pageHistory() public method

We're going to view a page's history
public pageHistory ( string $cabin = '' )
$cabin string

pageHistoryDiff() public method

We're going to view a page's history
public pageHistoryDiff ( string $cabin, string $leftUnique, string $rightUnique )
$cabin string
$leftUnique string
$rightUnique string

pageHistoryView() public method

We're going to view a page's history
public pageHistoryView ( string $cabin, string $uniqueId )
$cabin string
$uniqueId string

processDeleteDir() protected method

protected processDeleteDir ( integer $targetID, array $post = [], string $oldCabin = '', array $cabins = [] ) : boolean
$targetID integer
$post array
$oldCabin string
$cabins array
return boolean

processDeletePage() protected method

Confirm deletion
protected processDeletePage ( integer $pageId, array $post = [], string $cabin = '', string $dir = '' ) : boolean
$pageId integer
$post array
$cabin string
$dir string
return boolean

processEditPage() protected method

Create a new page in the current directory
protected processEditPage ( integer $pageId, array $post = [], string $cabin = '', string $dir = '' ) : boolean
$pageId integer
$post array
$cabin string
$dir string
return boolean

processMoveDir() protected method

Move/rename a directory.
protected processMoveDir ( array $dirInfo, array $post = [], string $oldCabin = '', array $cabins = [] ) : boolean
$dirInfo array
$post array
$oldCabin string
$cabins array
return boolean

processMovePage() protected method

Move a page
protected processMovePage ( array $page, array $post, string $cabin, string $dir ) : boolean
$page array
$post array
$cabin string
$dir string
return boolean

processNewDir() protected method

protected processNewDir ( string $cabin, string $parent, array $post = [] ) : boolean
$cabin string
$parent string
$post array
return boolean

processNewPage() protected method

Create a new page in the current directory
protected processNewPage ( string $cabin, string $path, array $post = [] ) : boolean
$cabin string
$path string
$post array
return boolean

renameDir() public method

We're going to move/rename a directory
public renameDir ( string $cabin )
$cabin string

renamePage() public method

We're going to create a directory
public renamePage ( string $cabin )
$cabin string

setTemplateExtraData() protected method

Set the cabin links
protected setTemplateExtraData ( string $cabin )
$cabin string

Property Details

$pg protected property

protected CustomPages,Airship\Cabin\Bridge\Blueprint $pg
return Airship\Cabin\Bridge\Blueprint\CustomPages