Constants

MATCH_LEFT

MATCH_LEFT

MATCH_RIGHT

MATCH_RIGHT

MATCH_ENDS

MATCH_ENDS

MATCH_ANY

MATCH_ANY

Properties

$supportedModes

$supportedModes : array

Display modes supported by this page.

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

Type

array

$_locks

$_locks : \Horde_Lock

A Horde_Locks instance for un-/locking this page.

Type

\Horde_Lock

$_lock

$_lock : array

Lock information if this page is currently locked.

Type

array

$_proc

$_proc : \Text_Wiki

Instance of a Text_Wiki processor.

Type

\Text_Wiki

$_page

$_page : array

The loaded page info.

Type

array

Methods

__construct()

__construct(string  $pagename, integer  $version = null) 

Construct a standard history page class to represent an old version of a wiki page.

Parameters

string $pagename

The name of the page to load.

integer $version

The version of the page to load.

Throws

\Wicked_Exception

allows()

allows(integer  $mode) : boolean

Returns if the page allows a mode. Access rights and user state are taken into consideration.

Parameters

integer $mode

The mode to check for.

Returns

boolean —

True if the mode is allowed.

displayContents()

displayContents(  $isBlock) 

Parameters

$isBlock

history()

history() 

Renders this page in history mode.

isLocked()

isLocked() 

lock()

lock() 

unlock()

unlock() 

getLockRequestor()

getLockRequestor() 

getLockTime()

getLockTime() 

updateText()

updateText(  $newtext,   $changelog) 

Parameters

$newtext
$changelog

pageID()

pageID() 

pageName()

pageName() 

getText()

getText() 

versionCreated()

versionCreated() 

hits()

hits() 

changeLog()

changeLog() 

version()

version() 

diff()

diff(string  $version) 

Renders this page in diff mode.

Parameters

string $version

The version to diff this page against.

getDiff()

getDiff(string  $version, string  $renderer = 'unified') 

Produces a diff for this page.

Parameters

string $version

Previous version, or null if diffing with `before the beginning' (empty).

string $renderer

The diff renderer.

isValid()

isValid() : boolean

Is this a validly loaded page?

Returns

boolean —

True if we've loaded data, false otherwise.

getPermissions()

getPermissions(string  $pageName = null) : integer

Retrieve this user's permissions for this page. If a permissions object does not exist, we assume reasonable defaults.

Parameters

string $pageName

The page name.

Returns

integer —

The permissions bitmask.

supports()

supports(integer  $mode) : boolean

See if the page supports a particular mode.

Parameters

integer $mode

Which mode to check for

Returns

boolean —

True or false

getCurrentPage()

getCurrentPage() : \Wicked_Page

Returns the page we are currently on.

Throws

\Wicked_Exception

Returns

\Wicked_Page

The current page.

getPage()

getPage(  $pagename,   $pagever = null,   $referrer = null) : \Wicked_Page

Returns the requested page.

Parameters

$pagename
$pagever
$referrer

Throws

\Wicked_Exception

Returns

\Wicked_Page

The requested page.

formatVersionCreated()

formatVersionCreated() 

author()

author() 

previousVersion()

previousVersion() : string

Returns the previous version number for this page.

Throws

\Wicked_Exception

Returns

string —

A string containing the previous version or null if this is the first version.

isOld()

isOld() 

display()

display() 

Renders this page in display mode.

This must be overridden if the page is to be anything like a real page.

Throws

\Wicked_Exception

preDisplay()

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

$param integer $mode The page render mode. $param array $params Any page parameters.

Parameters

$mode
$params

block()

block() : string

Renders this page for displaying in a block.

This must be overridden if the page is to be anything like a real page.

Throws

\Wicked_Exception

Returns

string —

The content.

remove()

remove() 

Renders this page in remove mode.

getProcessor()

getProcessor(  $output_format = 'Xhtml') 

Parameters

$output_format

render()

render(  $mode,   $params = null) 

Parameters

$mode
$params

toView()

toView() : object

Returns an object with Horde_View properties.

The returned object is supposed to be used with the _page.html.php partial.

Throws

\Wicked_Exception

Returns

object —

A simple object.

referrer()

referrer() 

pageUrl()

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

Parameters

$linkpage
$actionId

pageTitle()

pageTitle() 

handleAction()

handleAction() 

_setViewProperties()

_setViewProperties(  $view,   $page) 

Parameters

$view
$page

_getLinkConf()

_getLinkConf(boolean  $full = false) : array

Returns a link configuration for Text_Wiki.

Parameters

boolean $full

@see Wicked::url()

Returns

array —

A link configuration for Wiklink and Freelink rules.