include/MVC/SugarApplication.php

Show: inherited
Table of Contents

\SugarApplication

Package: SugarCRM

SugarCRM application

Api
 

Properties

Propertypublic  $controller= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $default_action= ''index''
Default value'index'Details
Type
n/a
Propertypublic  $default_module= ''Home''
Default value'Home'Details
Type
n/a
Propertyprivatearray  $globalModifyActions= 'array( 'massupdate', 'configuredashlet', 'import', 'importvcardsave', 'inlinefieldsave', 'wlsave', 'quicksave' )'

Actions that always modify data and thus require referrers save* and delete* hardcoded as modified

Default valuearray( 'massupdate', 'configuredashlet', 'import', 'importvcardsave', 'inlinefieldsave', 'wlsave', 'quicksave' )Details
Type
array
Propertypublic  $headerDisplayed= 'false'
Default valuefalseDetails
Type
n/a
Propertyprotectedarray  $modifyActions= 'array()'

Actions that modify data in this controller's instance and thus require referrers

Default valuearray()Details
Type
array
Propertyprivate  $modifyModules= 'array( 'Administration' => true, 'UpgradeWizard' => true, 'Configurator' => true, 'Studio' => true, 'ModuleBuilder' => true, 'Emails' => true, 'DCETemplates' => true, 'DCEInstances' => true, 'DCEActions' => true, 'Trackers' => array('trackersettings'), 'SugarFavorites' => array('tag'), 'Import' => array('last', 'undo'), 'Users' => array('changepassword', "generatepassword"), )'

Modules that modify data and thus require referrers for all actions

Default valuearray( 'Administration' => true, 'UpgradeWizard' => true, 'Configurator' => true, 'Studio' => true, 'ModuleBuilder' => true, 'Emails' => true, 'DCETemplates' => true, 'DCEInstances' => true, 'DCEActions' => true, 'Trackers' => array('trackersettings'), 'SugarFavorites' => array('tag'), 'Import' => array('last', 'undo'), 'Users' => array('changepassword', "generatepassword"), )Details
Type
n/a
Propertyprotected  $redirectVars= 'array('module', 'action', 'record', 'token', 'oauth_token', 'mobile')'
Default valuearray('module', 'action', 'record', 'token', 'oauth_token', 'mobile')Details
Type
n/a
Propertyprotectedarray  $whiteListActions= 'array('index', 'ListView', 'DetailView', 'EditView', 'oauth', 'authorize', 'Authenticate', 'Login', 'SupportPortal')'

The list of the actions excepted from referer checks by default

Default valuearray('index', 'ListView', 'DetailView', 'EditView', 'oauth', 'authorize', 'Authenticate', 'Login', 'SupportPortal')Details
Type
array

Methods

methodpublicACLFilter( ) : void

methodpublicSugarApplication( ) : void

methodpublicappendErrorMessage(  $error_message ) : void
static

Redirect to another URL

Parameters
Name Type Description
$error_message
Details
Access
public  
methodpubliccheckDatabaseVersion(  $dieOnFailure = true ) : void

checkDatabaseVersion Check the db version sugar_version.php and compare to what the version is stored in the config table.

Ensure that both are the same.

Parameters
Name Type Description
$dieOnFailure
methodprotectedcheckHTTPReferer(  $dieIfInvalid = true ) : void

Checks a request to ensure the request is coming from a valid source or it is for one of the white listed actions

Parameters
Name Type Description
$dieIfInvalid
methodpubliccreateLoginVars( ) : string

Create string to attach to login URL with vars to preserve post-login

Returns
Type Description
string URL part with login vars
methodpublicendSession( ) : void

methodpublicexecute( ) : void

Perform execution of the application. This method is called from index2.php

methodpublicgetErrorMessages( ) : void
static

methodpublicgetLoginRedirect( ) : string

Get URL to redirect after the login

Returns
Type Description
string the URL to redirect to
methodpublicgetLoginVars( bool $add_empty = true ) : array

Get the list of vars passed with login form

Parameters
Name Type Description
$add_empty bool

Add empty vars to the result?

Returns
Type Description
array List of vars passed with login
methodpublichandleAccessControl( ) : void

Handles everything related to authorization.

methodpublichandleOfflineClient( ) : void

methodprotectedisModifyAction( ) : void

methodpublicloadDisplaySettings( ) : void

Load the themes/images.

methodpublicloadGlobals( ) : void

methodpublicloadLanguages( ) : void

Load application wide languages as well as module based languages so they are accessible from the module.

methodpublicloadLicense( ) : void

methodpublicloadUser( ) : void

Load the authenticated user. If there is not an authenticated user then redirect to login screen.

methodpublicpreLoadLanguages( ) : void
static

Load only bare minimum of language that can be done before user init and MVC stuff

methodpublicpreProcess( ) : void

methodpublicredirect( string $url ) : void

Redirect to another URL

Parameters
Name Type Description
$url string

The URL to redirect to

Details
Access
public  
methodpublicsetCookie(  $name,  $value,  $expire = 0,  $path = '/',  $domain = null,  $secure = false,  $httponly = false ) : void
static

Wrapper for the PHP setcookie() function, to handle cases where headers have already been sent

Parameters
Name Type Description
$name
$value
$expire
$path
$domain
$secure
$httponly
methodpublicsetupPrint( ) : void

methodpublicsetupResourceManagement(  $module ) : void

setupResourceManagement This function initialize the ResourceManager and calls the setup method on the ResourceManager instance.

Parameters
Name Type Description
$module
methodpublicstartSession( ) : void

methodprotectedtrackLogin( ) : void

trackLogin

This is a protected function used to separate tracking the login information. This allows us to better cleanly separate a PRO feature as well as unit test this block. This function writes log entries to the tracker_sessions table to record a login session.

Documentation was generated by DocBlox 0.18.1.