\seekquarry\yioop\views\elementsApiElement

Element responsible for drawing wiki pages in either admin or wiki view It is also responsible for rendering wiki history pages, and listings of wiki pages available for a group

Elements are classes are used to render portions of a web page which might be common to several views like a view there is supposed to minimal php code in an element

Summary

Methods
Properties
Constants
__construct()
render()
renderJsonDocument()
$view
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$view

$view : object

The View on which this Element is drawn

Type

object

Methods

__construct()

__construct(object  $view = null) 

constructor stores a reference to the view this element will reside on

Parameters

object $view

object this element will reside on

render()

render(array  $data) 

Draw a wiki page for group, or, depending on $data['MODE'] a listing of all pages for a group, or the history of revisions of a given page or the edit page form

It should be implemented in subclasses.

Parameters

array $data

fields contain data about the page being displayeed or edited, or the list of pages being displayed.

renderJsonDocument()

renderJsonDocument(array  $data, boolean  $can_edit, boolean  $logged_in) 

Used to send a Wiki content response for reading. If the page does not exist various create/login-to-create etc messages are displayed depending of it the user is logged in. and has write permissions on the group.

Parameters

array $data

fields PAGE used for page contents

boolean $can_edit

whether the current user has permissions to edit or create this page

boolean $logged_in

whether current user is logged in or not