dolibarr 21.0.0-alpha
Controller Class Reference

Class to manage pages. More...

Inheritance diagram for Controller:

Public Member Functions

 __construct ()
 Constructor.
 
 action ()
 Action method is called before html output can be used to manage security and change context.
 
 checkAccess ()
 Check current access to controller.
 
 display ()
 Display.
 
 display404 ()
 Display error template.
 
 hookDoAction ($parameters=array())
 Execute hook doActions.
 
 hookPrintPageView ($parameters=array())
 Execute hook PrintPageView.
 
 loadTemplate ($templateName, $vars=false)
 Load a template .tpl file.
 

Detailed Description

Class to manage pages.

Definition at line 28 of file controller.class.php.

Constructor & Destructor Documentation

◆ __construct()

Controller::__construct ( )

Constructor.

Returns
void

Definition at line 64 of file controller.class.php.

Member Function Documentation

◆ action()

Controller::action ( )

Action method is called before html output can be used to manage security and change context.

Returns
int Return integer < 0 on error, > 0 on success

Reimplemented in DefaultController, DocumentController, InvoiceListController, LoginController, MemberCardController, OrderListController, PartnershipCardController, and PropalListController.

Definition at line 80 of file controller.class.php.

References hookDoAction().

◆ checkAccess()

Controller::checkAccess ( )

◆ display()

◆ display404()

◆ hookDoAction()

Controller::hookDoAction ( $parameters = array())

Execute hook doActions.

Parameters
array$parametersParameters
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 147 of file controller.class.php.

References $context, and Context\getInstance().

Referenced by action(), DefaultController\action(), InvoiceListController\action(), LoginController\action(), MemberCardController\action(), OrderListController\action(), PartnershipCardController\action(), and PropalListController\action().

◆ hookPrintPageView()

Controller::hookPrintPageView ( $parameters = array())

Execute hook PrintPageView.

Parameters
array$parametersParameters
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 170 of file controller.class.php.

References $context, and Context\getInstance().

Referenced by display(), DefaultController\display(), InvoiceListController\display(), LoginController\display(), MemberCardController\display(), OrderListController\display(), PartnershipCardController\display(), and PropalListController\display().

◆ loadTemplate()

Controller::loadTemplate ( $templateName,
$vars = false )

Load a template .tpl file.

Parameters
string$templateNameTemplate file name (without the .tpl.php)
mixed$varsData to transmit to template
Returns
bool True if template found, else false

Definition at line 194 of file controller.class.php.

References $context, and Context\getInstance().

Referenced by display(), DefaultController\display(), InvoiceListController\display(), LoginController\display(), MemberCardController\display(), OrderListController\display(), PartnershipCardController\display(), PropalListController\display(), and display404().


The documentation for this class was generated from the following file: