Choose how to display the current page

package salt\view

 Methods

Set the view to EDIT : all element declared as FORM will be displayed as form.

edit() 
Static

Check if a type is EDIT

isEdit(string $type = NULL) : boolean
Static

Parameters

$type

string

ViewControl type to check, or NULL for current

Returns

booleanTRUE if parameter (or current if parameter NULL) is EDIT

Check if a type is SHOW

isShow(string $type = NULL) : boolean
Static

Parameters

$type

string

ViewControl type to check, or NULL for current

Returns

booleanTRUE if parameter (or current if parameter NULL) is SHOW

Check if a type is TEXT

isText(string $type = NULL) : boolean
Static

Parameters

$type

string

ViewControl type to check, or NULL for current

Returns

booleanTRUE if parameter (or current if parameter NULL) is TEXT

Set the view to SHOW : all element will be displayed for reading only. FORM element are converted to VIEW

show() 
Static

Set the view to TEXT : FORM and VIEW will return <b>non-escaped HTML value</b>

text() 
Static

 Properties

 

current type of the view

$type : string

Default

self::SHOW
Static

 Constants

 

EDIT state : FORM return input HTML tags

EDIT = 'edit' 
 

SHOW state : every FORM act as a VIEW

SHOW = 'show' 
 

TEXT state : every FORM & VIEW return a not HTML escaped text

TEXT = 'text'