Properties

$css_files

$css_files : array

Type

array — list of css files

$js_files

$js_files : array

Type

array — list of javascript files

$php_errors

$php_errors : array

Type

array — list of php error

$ajax

$ajax : boolean

Type

boolean — If ajax parameter is detected in request, set this flag to true

$controller_type

$controller_type : 

Type

$php_self

$php_self : 

Type

$context

$context : \Context

Type

\Context

$display_header

$display_header : boolean

Type

boolean — check if header will be displayed

$template

$template : string

Type

string — template name for page content

$display_footer

$display_footer : string

Type

string — check if footer will be displayed

$content_only

$content_only : string

Type

string — check if only content will be displayed

$json

$json : 

Type

$status

$status : 

Type

$redirect_after

$redirect_after : 

Type

Methods

checkAccess()

checkAccess() 

check that the controller is available for the current user/visitor

viewAccess()

viewAccess() 

check that the current user/visitor has valid view permissions

init()

init() 

Initialize the page

postProcess()

postProcess() 

Do the page treatment : post process, ajax process, etc.

display()

display() 

Display page view

setMedia()

setMedia() 

Set default media list for controller

getController()

getController(string  $class_name, boolean  $auth = false, boolean  $ssl = false) 

Get an instance of a controller

Parameters

string $class_name
boolean $auth
boolean $ssl

__construct()

__construct() 

run()

run() 

Start controller process (this method shouldn't be overriden !)

displayHeader()

displayHeader(  $display = true) 

Parameters

$display

displayFooter()

displayFooter(  $display = true) 

Parameters

$display

setTemplate()

setTemplate(  $template) 

Parameters

$template

initHeader()

initHeader() 

Assign smarty variables for the page header

initContent()

initContent() 

Assign smarty variables for the page main content

initCursedPage()

initCursedPage() 

Assign smarty variables when access is forbidden

initFooter()

initFooter() 

Assign smarty variables for the page footer

addCSS()

addCSS(mixed  $css_uri, string  $css_media_type = 'all', integer  $offset = null, boolean  $check_path = true) : true

Add a new stylesheet in page header.

Parameters

mixed $css_uri

Path to css file, or list of css files like this : array(array(uri => media_type), ...)

string $css_media_type
integer $offset
boolean $check_path

Returns

true

removeCSS()

removeCSS(  $css_uri,   $css_media_type = 'all',   $check_path = true) 

Parameters

$css_uri
$css_media_type
$check_path

addJS()

addJS(mixed  $js_uri, boolean  $check_path = true) : void

Add a new javascript file in page header.

Parameters

mixed $js_uri
boolean $check_path

removeJS()

removeJS(  $js_uri,   $check_path = true) 

Parameters

$js_uri
$check_path

addJquery()

addJquery(  $version = null,   $folder = null,   $minifier = true) : void

Add a new javascript file in page header.

Parameters

$version
$folder
$minifier

addJqueryUI()

addJqueryUI(  $component,   $theme = 'base',   $check_dependencies = true) : void

Add a new javascript file in page header.

Parameters

$component
$theme
$check_dependencies

addJqueryPlugin()

addJqueryPlugin(  $name, null  $folder = null, boolean  $css = true) 

Add a new javascript file in page header.

Parameters

$name
null $folder
boolean $css

isXmlHttpRequest()

isXmlHttpRequest() : boolean

Returns

boolean —

return true if Controller is called from XmlHttpRequest

myErrorHandler()

myErrorHandler(  $errno,   $errstr,   $errfile,   $errline) 

Parameters

$errno
$errstr
$errfile
$errline

redirect()

redirect() 

Redirect after process if no error

smartyOutputContent()

smartyOutputContent(  $content) 

Parameters

$content

isCached()

isCached(  $template,   $cacheId = null,   $compileId = null) 

Parameters

$template
$cacheId
$compileId

ajaxDie()

ajaxDie(  $value = null,   $controller = null,   $method = null) 

Parameters

$value
$controller
$method