PHP Class Wicked_Page, horde

Author: Tyler Colbert ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$supportedModes array Wicked::MODE_CONTENT Wicked::MODE_DISPLAY Wicked::MODE_EDIT Wicked::MODE_REMOVE Wicked::MODE_HISTORY Wicked::MODE_DIFF Wicked::MODE_LOCKING Wicked::MODE_UNLOCKING Wicked::MODE_CREATE

Protected Properties

Property Type Description
$_page array The loaded page info.
$_proc Text_Wiki Instance of a Text_Wiki processor.

Public Methods

Method Description
allows ( integer $mode ) : boolean Returns if the page allows a mode. Access rights and user state are taken into consideration.
author ( )
block ( ) : string Renders this page for displaying in a block.
changeLog ( )
diff ( string $version ) Renders this page in diff mode.
display ( ) Renders this page in display mode.
displayContents ( $isBlock )
formatVersionCreated ( )
getCurrentPage ( ) : Wicked_Page Returns the page we are currently on.
getPage ( $pagename, $pagever = null, $referrer = null ) : Wicked_Page Returns the requested page.
getPermissions ( $pageName = null ) : integer Retrieve this user's permissions for this page. If a permissions object does not exist, we assume reasonable defaults.
getProcessor ( $output_format = 'Xhtml' )
getText ( )
handleAction ( )
history ( ) Renders this page in history mode.
hits ( )
isLocked ( )
isOld ( )
isValid ( ) : boolean Is this a validly loaded page?
lock ( )
pageName ( )
pageTitle ( )
pageUrl ( $linkpage = null, $actionId = null )
preDisplay ( $mode, $params ) Perform any pre-display checks for permissions, searches, etc. Called before any output is sent so the page can do redirects. If the page wants to take control of flow from here, it can, and is entirely responsible for handling the user (should call exit after redirecting, for example).
previousVersion ( ) : string Returns the previous version number for this page.
referrer ( )
remove ( ) Renders this page in remove mode.
render ( $mode, $params = null )
supports ( integer $mode ) : boolean See if the page supports a particular mode.
toView ( ) : object Returns an object with Horde_View properties.
unlock ( )
updateText ( $newtext, $changelog )
version ( )
versionCreated ( )

Protected Methods

Method Description
_getLinkConf ( boolean $full = false ) : array Returns a link configuration for Text_Wiki.

Method Details

_getLinkConf() protected method

Returns a link configuration for Text_Wiki.
protected _getLinkConf ( boolean $full = false ) : array
$full boolean @see Wicked::url()
return array A link configuration for Wiklink and Freelink rules.

allows() public method

Returns if the page allows a mode. Access rights and user state are taken into consideration.
public allows ( integer $mode ) : boolean
$mode integer The mode to check for.
return boolean True if the mode is allowed.

author() public method

public author ( )

block() public method

This must be overridden if the page is to be anything like a real page.
public block ( ) : string
return string The content.

changeLog() public method

public changeLog ( )

diff() public method

Renders this page in diff mode.
public diff ( string $version )
$version string The version to diff this page against.

display() public method

This must be overridden if the page is to be anything like a real page.
public display ( )

displayContents() public method

public displayContents ( $isBlock )

formatVersionCreated() public method

getCurrentPage() public static method

Returns the page we are currently on.
public static getCurrentPage ( ) : Wicked_Page
return Wicked_Page The current page.

getPage() public static method

Returns the requested page.
public static getPage ( $pagename, $pagever = null, $referrer = null ) : Wicked_Page
return Wicked_Page The requested page.

getPermissions() public method

Retrieve this user's permissions for this page. If a permissions object does not exist, we assume reasonable defaults.
public getPermissions ( $pageName = null ) : integer
return integer The permissions bitmask.

getProcessor() public method

public getProcessor ( $output_format = 'Xhtml' )

getText() public method

public getText ( )

handleAction() public method

public handleAction ( )

history() public method

Renders this page in history mode.
public history ( )

hits() public method

public hits ( )

isLocked() public method

public isLocked ( )

isOld() public method

public isOld ( )

isValid() public method

Is this a validly loaded page?
public isValid ( ) : boolean
return boolean True if we've loaded data, false otherwise.

lock() public method

public lock ( )

pageName() public method

public pageName ( )

pageTitle() public method

public pageTitle ( )

pageUrl() public method

public pageUrl ( $linkpage = null, $actionId = null )

preDisplay() public method

$param integer $mode The page render mode. $param array $params Any page parameters.
public preDisplay ( $mode, $params )

previousVersion() public method

Returns the previous version number for this page.
public previousVersion ( ) : string
return string A string containing the previous version or null if this is the first version.

referrer() public method

public referrer ( )

remove() public method

Renders this page in remove mode.
public remove ( )

render() public method

public render ( $mode, $params = null )

supports() public method

See if the page supports a particular mode.
public supports ( integer $mode ) : boolean
$mode integer Which mode to check for
return boolean True or false

toView() public method

The returned object is supposed to be used with the _page.html.php partial.
public toView ( ) : object
return object A simple object.

unlock() public method

public unlock ( )

updateText() public method

public updateText ( $newtext, $changelog )

version() public method

public version ( )

versionCreated() public method

public versionCreated ( )

Property Details

$_page protected_oe property

The loaded page info.
protected array $_page
return array

$_proc protected_oe property

Instance of a Text_Wiki processor.
protected Text_Wiki $_proc
return Text_Wiki

$supportedModes public_oe property

Wicked::MODE_CONTENT Wicked::MODE_DISPLAY Wicked::MODE_EDIT Wicked::MODE_REMOVE Wicked::MODE_HISTORY Wicked::MODE_DIFF Wicked::MODE_LOCKING Wicked::MODE_UNLOCKING Wicked::MODE_CREATE
public array $supportedModes
return array