Yioop_V9.5_Source_Code_Documentation

ApiElement extends Element
in package
implements CrawlConstants

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

Tags
author

Eswara Rajesh Pinapala

Interfaces, Classes, Traits and Enums

CrawlConstants
Shared constants and enums used by components that are involved in the crawling process

Table of Contents

$view  : object
The View on which this Element is drawn
__construct()  : mixed
constructor stores a reference to the view this element will reside on
formatHref()  : string
Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
render()  : mixed
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
renderJsonDocument()  : mixed
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.

Properties

$view

The View on which this Element is drawn

public object $view

Methods

__construct()

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

public __construct([object $view = null ]) : mixed
Parameters
$view : object = null

object this element will reside on

Return values
mixed

formatHref()

Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)

public formatHref(string $url) : string
Parameters
$url : string

to clean up

Return values
string

cleaned url

render()

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

public render(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

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

Return values
mixed

renderJsonDocument()

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.

public renderJsonDocument(array<string|int, mixed> $data, bool $can_edit, bool $logged_in) : mixed
Parameters
$data : array<string|int, mixed>

fields PAGE used for page contents

$can_edit : bool

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

$logged_in : bool

whether current user is logged in or not

Return values
mixed

        

Search results