Skip to content

Latest commit

 

History

History
789 lines (382 loc) · 15.6 KB

class.ControllerCore.md

File metadata and controls

789 lines (382 loc) · 15.6 KB

Class ControllerCore

Contents

Properties

Methods

Properties

$ajax

public boolean $ajax = false

$content_only

protected string $content_only = false

$context

protected \Context $context

$controller_type

public mixed $controller_type

$css_files

public array $css_files = array()

$display_footer

protected string $display_footer

$display_header

protected boolean $display_header

$js_files

public array $js_files = array()

$json

protected mixed $json = false

$php_errors

public array $php_errors = array()

$php_self

public mixed $php_self

$redirect_after

protected mixed $redirect_after = null

$status

protected mixed $status = ''

$template

protected string $template

Methods

__construct

mixed ControllerCore::__construct()

addCSS

true ControllerCore::addCSS(mixed $css_uri, string $css_media_type, $offset)

Add a new stylesheet in page header.

Arguments

  • $css_uri mixed - Path to css file, or list of css files like this : array(array(uri => media_type), ...)
  • $css_media_type string
  • $offset mixed

addJS

void ControllerCore::addJS(mixed $js_uri)

Add a new javascript file in page header.

Arguments

  • $js_uri mixed

addJquery

void ControllerCore::addJquery($version, $folder, $minifier)

Add a new javascript file in page header.

Arguments

  • $version mixed
  • $folder mixed
  • $minifier mixed

addJqueryPlugin

mixed ControllerCore::addJqueryPlugin($name, null $folder, boolean $css)

Add a new javascript file in page header.

Arguments

  • $name mixed
  • $folder null
  • $css boolean

addJqueryUI

void ControllerCore::addJqueryUI($component, $theme, $check_dependencies)

Add a new javascript file in page header.

Arguments

  • $component mixed
  • $theme mixed
  • $check_dependencies mixed

checkAccess

mixed ControllerCore::checkAccess()

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

display

mixed ControllerCore::display()

Display page view

displayFooter

mixed ControllerCore::displayFooter($display)

Arguments

  • $display mixed

displayHeader

mixed ControllerCore::displayHeader($display)

Arguments

  • $display mixed

getController

mixed ControllerCore::getController(string $class_name, boolean $auth, boolean $ssl)

Get an instance of a controller

Arguments

  • $class_name string
  • $auth boolean
  • $ssl boolean

init

mixed ControllerCore::init()

Initialize the page

initContent

mixed ControllerCore::initContent()

Assign smarty variables for the page main content

initCursedPage

mixed ControllerCore::initCursedPage()

Assign smarty variables when access is forbidden

initFooter

mixed ControllerCore::initFooter()

Assign smarty variables for the page footer

initHeader

mixed ControllerCore::initHeader()

Assign smarty variables for the page header

isCached

mixed ControllerCore::isCached($template, $cacheId, $compileId)

Arguments

  • $template mixed
  • $cacheId mixed
  • $compileId mixed

isXmlHttpRequest

boolean ControllerCore::isXmlHttpRequest()

myErrorHandler

mixed ControllerCore::myErrorHandler($errno, $errstr, $errfile, $errline)

Arguments

  • $errno mixed
  • $errstr mixed
  • $errfile mixed
  • $errline mixed

postProcess

mixed ControllerCore::postProcess()

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

redirect

mixed ControllerCore::redirect()

Redirect after process if no error

removeCSS

mixed ControllerCore::removeCSS($css_uri, $css_media_type)

Arguments

  • $css_uri mixed
  • $css_media_type mixed

removeJS

mixed ControllerCore::removeJS($js_uri)

Arguments

  • $js_uri mixed

run

mixed ControllerCore::run()

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

setMedia

mixed ControllerCore::setMedia()

Set default media list for controller

setTemplate

mixed ControllerCore::setTemplate($template)

Arguments

  • $template mixed

smartyOutputContent

mixed ControllerCore::smartyOutputContent($content)

Arguments

  • $content mixed

viewAccess

mixed ControllerCore::viewAccess()

check that the current user/visitor has valid view permissions