|
dolibarr 24.0.0-beta
|

Public Member Functions | |
| initController ($init_theme=true) | |
| Init controller. | |
| addControllerDefinition ($controller, $path, $className) | |
| Add controller definition. | |
| setControllerFound () | |
| Set controller found. | |
| getRootUrl ($controller='', $moreParams='', $addToken=true) | |
| Get root url. | |
| getControllerUrl ($controller='', $moreParams='', $addToken=true) | |
| Get controller url according to context. | |
| userIsLog () | |
| Check if user is logged. | |
| menuIsActive ($menuName) | |
| Is menu enabled ? | |
| setError ($errors) | |
| Set errors. | |
| getErrors () | |
| Get errors. | |
| clearErrors () | |
| Clear errors. | |
| setEventMessage ($mesgs, $style='mesgs') | |
| Set event messages in dol_events session object. | |
| setEventMessages ($mesg, $mesgs, $style='mesgs') | |
| Set event messages in dol_events session object. | |
| loadEventMessages () | |
| Load event messages. | |
| clearEventMessages () | |
| Clear event messages. | |
| newToken () | |
| Return the value of token currently saved into session with name 'newToken'. | |
| getUrlToken () | |
| Get token url. | |
| getFormToken () | |
| Get token input for form. | |
| getThirdPartyAccountFromLogin ($login, $pass) | |
| Try to find the third-party account id from. | |
| getMemberAccountFromLogin ($login, $pass) | |
| Try to find the member account id from. | |
Static Public Member Functions | |
| static | getInstance () |
| Singleton method to create one instance of this object. | |
| static | getRootConfigUrl () |
| Get WebPortal root url. | |
| static | getPublicControllerUrl ($controller='', $moreParams='', $Tparams=array()) |
| Generate public controller URL Used for external link (like email or web page) so remove token and contextual behavior associate with current user. | |
| static | urlOrigin ($withRequestUri=true, $use_forwarded_host=false) |
| Url origin. | |
Public Attributes | |
| $appliName | |
| The application name. | |
| $object | |
| Current object of page. | |
Protected Member Functions | |
| generateNewToken () | |
| Generate new token. | |
Private Member Functions | |
| __construct () | |
| Constructor. | |
Class Context.
Definition at line 32 of file context.class.php.
|
private |
Constructor.
Definition at line 185 of file context.class.php.
References $db, dol_buildpath(), getControllerUrl(), getDolGlobalString(), GETPOST(), getRootConfigUrl(), and initController().
| Context::addControllerDefinition | ( | $controller, | |
| $path, | |||
| $className ) |
Add controller definition.
| string | $controller | Name |
| string | $path | Path |
| string | $className | Class name |
Definition at line 295 of file context.class.php.
References setError().
Referenced by initController().
| Context::clearErrors | ( | ) |
| Context::clearEventMessages | ( | ) |
|
protected |
Generate new token.
Definition at line 658 of file context.class.php.
References newToken().
| Context::getControllerUrl | ( | $controller = '', | |
| $moreParams = '', | |||
| $addToken = true ) |
Get controller url according to context.
| string | $controller | Controller name |
| string|array<string,mixed> | $moreParams More parameters | |
| bool | $addToken | Add token hash only if controller is set |
Definition at line 365 of file context.class.php.
References getPublicControllerUrl(), and newToken().
Referenced by __construct(), and getRootUrl().
| Context::getErrors | ( | ) |
| Context::getFormToken | ( | ) |
Get token input for form.
Definition at line 699 of file context.class.php.
References newToken().
|
static |
Singleton method to create one instance of this object.
Definition at line 228 of file context.class.php.
Referenced by DefaultController\action(), DocumentController\action(), DocumentListController\action(), FicheinterListController\action(), InvoiceListController\action(), LoginController\action(), MemberCardController\action(), OrderListController\action(), PartnershipCardController\action(), PropalListController\action(), SharedDocumentsController\action(), TicketListController\action(), ViewImageController\action(), Controller\checkAccess(), LoginController\checkAccess(), MemberCardController\checkAccess(), PartnershipCardController\checkAccess(), FormWebPortal\convertAllLink(), AbstractCardController\display(), Controller\display(), DefaultController\display(), DocumentController\display(), DocumentListController\display(), FicheinterListController\display(), InvoiceListController\display(), LoginController\display(), OrderListController\display(), PropalListController\display(), SharedDocumentsController\display(), TicketListController\display(), FormCardWebPortal\doActions(), FormWebPortal\getDocumentsLink(), WebPortalTheme\getIconImagesUrl(), getNavItem(), Controller\hookDoAction(), Controller\hookPrintPageView(), DocumentController\init(), ViewImageController\init(), WebPortalTheme\init(), Controller\loadTemplate(), FormListWebPortal\setParams(), and FormListWebPortal\setSqlRequest().
| Context::getMemberAccountFromLogin | ( | $login, | |
| $pass ) |
Try to find the member account id from.
| string | $login | Login |
| string | $pass | Password |
Definition at line 770 of file context.class.php.
References $id, dol_syslog(), dol_verifyHash(), and getEntity().
|
static |
Generate public controller URL Used for external link (like email or web page) so remove token and contextual behavior associate with current user.
| string | $controller | Controller |
| string|array<string,mixed> | $moreParams More parameters | |
| array<string,mixed> | $Tparams Parameters |
Definition at line 396 of file context.class.php.
References getRootConfigUrl().
Referenced by getControllerUrl().
|
static |
Get WebPortal root url.
Definition at line 328 of file context.class.php.
References dol_buildpath(), and getDolGlobalString().
Referenced by __construct(), WebPortalFieldsManager\__construct(), getPublicControllerUrl(), and WebPortalTheme\init().
| Context::getRootUrl | ( | $controller = '', | |
| $moreParams = '', | |||
| $addToken = true ) |
Get root url.
| string | $controller | Controller name |
| string|array<string,mixed> | $moreParams More parameters | |
| bool | $addToken | Add token hash only if $controller is set |
Definition at line 352 of file context.class.php.
References getControllerUrl().
| Context::getThirdPartyAccountFromLogin | ( | $login, | |
| $pass ) |
Try to find the third-party account id from.
| string | $login | Login |
| string | $pass | Password |
Definition at line 716 of file context.class.php.
References $id, dol_syslog(), dol_verifyHash(), and getEntity().
| Context::getUrlToken | ( | ) |
Get token url.
Definition at line 684 of file context.class.php.
References newToken().
| Context::initController | ( | $init_theme = true | ) |
Init controller.
| bool | $init_theme | Init theme properties |
Definition at line 243 of file context.class.php.
References addControllerDefinition(), and setControllerFound().
Referenced by __construct().
| Context::loadEventMessages | ( | ) |
| Context::menuIsActive | ( | $menuName | ) |
Is menu enabled ?
| string | $menuName | Menu name |
Definition at line 503 of file context.class.php.
| Context::newToken | ( | ) |
Return the value of token currently saved into session with name 'newToken'.
This token must be sent by any POST as it will be used by next page for comparison with value in session. This token depends on controller
Definition at line 648 of file context.class.php.
References newToken().
Referenced by generateNewToken(), getControllerUrl(), getFormToken(), getUrlToken(), and newToken().
| Context::setControllerFound | ( | ) |
Set controller found.
Definition at line 318 of file context.class.php.
Referenced by initController().
| Context::setError | ( | $errors | ) |
Set errors.
| string | string[] | $errors | Errors |
Definition at line 514 of file context.class.php.
Referenced by addControllerDefinition().
| Context::setEventMessage | ( | $mesgs, | |
| $style = 'mesgs' ) |
Set event messages in dol_events session object.
Will be output by calling dol_htmloutput_events. Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function.
| string | string[] | $mesgs | Message string or array |
| string | $style | Which style to use ('mesgs' by default, 'warnings', 'errors') |
Definition at line 563 of file context.class.php.
Referenced by setEventMessages().
| Context::setEventMessages | ( | $mesg, | |
| $mesgs, | |||
| $style = 'mesgs' ) |
Set event messages in dol_events session object.
Will be output by calling dol_htmloutput_events. Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function.
| string | $mesg | Message string |
| string[] | null | $mesgs | Message array |
| string | $style | Which style to use ('mesgs' by default, 'warnings', 'errors') |
Definition at line 596 of file context.class.php.
References dol_print_error(), dol_syslog(), and setEventMessage().
|
static |
Url origin.
| bool | $withRequestUri | With request URI |
| bool | $use_forwarded_host | Use formatted host |
Definition at line 450 of file context.class.php.
| Context::userIsLog | ( | ) |