include/MVC/View/SugarView.php

Show: inherited
Table of Contents

\SugarView

Package: SugarCRM

Base Sugar view

Children
\HomeViewAdditionaldetailsretrieve
\ViewMain
\ViewModulelabels
\ViewHome
\ViewHistory
\ViewHistory
\ViewDisplaydeployresult
\ViewModule
\ViewExportcustomizations
\ViewDropdowns
\ViewRelationship
\Viewpackage
\Viewdeletepackage
\ViewDropdown
\ViewResetmodule
\ModuleBuilderViewWizard
\ViewDisplaydeploy
\ViewProperty
\Viewdeletemodule
\ViewModulefields
\ViewModulefield
\ViewRelationships
\ImportViewStep4
\ImportView
\ImportViewError
\DocumentsViewExtdoc
\ViewWizard
\CampaignsViewClassic
\OauthTokensViewAuthorize
\ViewAdminsettings
\CalendarViewSaveSettings
\CalendarViewJson
\CalendarViewQuickEdit
\CalendarViewCreateInvitee
\CalendarViewGetGR
\CalendarViewGetGRUsers
\ConfiguratorViewFontManager
\ConfiguratorViewSugarpdfsettings
\ViewAdminwizard
\ConfiguratorViewAddFontView
\ConfiguratorViewAddFontResult
\ViewCampaignconfig
\ViewConfig
\ViewConvertLead
\ViewShowDuplicates
\ViewModifyProperties
\ViewModifyMapping
\ViewConnectorSettings
\ViewModifyDisplay
\ViewModifySearch
\ContactsViewValidPortalUsername
\ContactsViewContactAddressPopup
\ContactsViewRetrieveEmail
\ContactsViewMailMergePopup
\ViewBackups
\ViewLanguages
\ViewConfiguretabs
\AdministrationViewGlobalsearchsettings
\ViewConfigureAjaxUI
\AdministrationViewThemesettings
\ViewRepair
\ViewImportvcard
\ViewMultiedit
\ViewSugarpdf
\ViewDetail
\ViewJson
\ViewSerialized
\ViewAjax
\ViewXML
\ViewModulelistmenu
\ViewVcard
\ViewNoaccess
\ViewList
\ViewClassic
\ViewHtml
\ViewMetadata
\ViewPopup
\ViewEdit
\ViewFavorites
\ViewAjaxUI
\ViewImportvcardsave
Api
 

Properties

Propertypublic  $action= ''''

The name of the current action.

Default value''Details
Type
n/a
Propertypublic  $bean= 'null'

Default valuenullDetails
Type
n/a
Propertypublic  $errors= 'array()'

Any errors that occured this can either be set by the view or the controller or the model

Default valuearray()Details
Type
n/a
Propertypublic  $fileResources= ''
Details
Type
n/a
Propertypublic  $module= ''''

The name of the current module.

Default value''Details
Type
n/a
Propertypublic  $options= 'array('show_header' => true, 'show_title' => true, 'show_subpanels' => false, 'show_search' => true, 'show_footer' => true, 'show_javascript' => true, 'view_print' => false,)'

Options for what UI elements to hide/show/

Default valuearray('show_header' => true, 'show_title' => true, 'show_subpanels' => false, 'show_search' => true, 'show_footer' => true, 'show_javascript' => true, 'view_print' => false,)Details
Type
n/a
Propertypublic  $responseTime= ''
Details
Type
n/a
Propertypublic  $ss= 'null'

Sugar_Smarty. This is useful if you have a view and a subview you can share the same smarty object.

Default valuenullDetails
Type
n/a
Propertypublic  $suppressDisplayErrors= 'false'

Set to true if you do not want to display errors from SugarView::displayErrors(); instead they will be returned

Default valuefalseDetails
Type
n/a
Propertypublic  $type= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $view_object_map= 'array()'

This array is meant to hold an objects/data that we would like to pass between the controller and the view. The bean will automatically be set for us, but this is meant to hold anything else.

Default valuearray()Details
Type
n/a

Methods

methodpublicSugarView(  $bean = null,  $view_object_map = array() ) : void

Constructor which will peform the setup.

Parameters
Name Type Description
$bean
$view_object_map
methodprotected_buildModuleList( ) : void

methodprivate_calculateFooterMetrics( ) : void

methodprotected_checkModule( ) : void

Checks to see if the module name passed is valid; dies if it is not

methodprotected_displayJavascript( ) : void

Called from process(). This method will display the correct javascript.

methodprotected_displayLoginJS( ) : void

methodprotected_displaySubPanels( ) : void

Called from process(). This method will display subpanels.

methodprotected_getModLanguageJS( ) : void

methodprotected_getModuleTab( ) : void

Returns the module name which should be highlighted in the module menu

methodprotected_getModuleTitleListParam( bool $browserTitle = false ) : string

Returns the portion of the array that will represent the listview in the breadcrumb

Parameters
Name Type Description
$browserTitle bool

true if the returned string is being used for the browser title, meaning there should be no HTML in the string

Returns
Type Description
string
methodprotected_getModuleTitleParams( bool $browserTitle = false ) : array

Returns an array composing of the breadcrumbs to use for the module title

Parameters
Name Type Description
$browserTitle bool

true if the returned string is being used for the browser title, meaning there should be no HTML in the string

Returns
Type Description
array
methodprotected_getOption( string $option, bool $default = false ) : bool

private method used in process() to determine the value of a passed in option

Parameters
Name Type Description
$option string

option - the option that we want to know the valye of

$default bool

default - what the default value should be if we do not find the option

Returns
Type Description
bool - the value of the option
methodprivate_getStatistics( ) : void

methodprotected_initSmarty( ) : void

methodprivate_track( ) : void

track Private function to track information about the view request

methodprotected_trackView( ) : void

trackView

methodpubliccheckPostMaxSizeError( ) : boolean

Determines whether the state of the post global array indicates there was an error uploading a file that exceeds the post_max_size setting. Such an error can be detected if: 1. The Server['REQUEST_METHOD'] will still point to POST 2. POST and FILES global arrays will be returned empty despite the request method This also results in a redirect to the home page (due to lack of module and action in POST)

Returns
Type Description
boolean indicating true or false
methodpublicdisplay( ) : void

[OVERRIDE] - This method is meant to overidden in a subclass. This method will handle the actual display logic of the view.

methodpublicdisplayErrors( ) : void

This method will display the errors on the page.

methodpublicdisplayFooter( ) : void

Called from process(). This method will display the footer on the page.

methodpublicdisplayHeader(  $retModTabs = false ) : void

Displays the header on section of the page; basically everything before the content

Parameters
Name Type Description
$retModTabs
methodprotectedfetchTemplate( \$file $file ) : \$content

fetchTemplate

This function wraps the call to the fetch function of the Smarty variable for the view

Parameters
Name Type Description
$file \$file

String path of the file to fetch

Returns
Type Description
\$content String content from resulting Smarty fetch operation on template
methodpublicgetBreadCrumbSymbol( ) : string

Returns the correct breadcrumb symbol according to theme's directionality setting

Returns
Type Description
string
methodpublicgetBrowserTitle( ) : string

Returns the string which will be shown in the browser's title; defaults to using the same breadcrumb as in the module title

Returns
Type Description
string
methodprotectedgetCustomFilePathIfExists( \$file $file ) : \$file

getCustomFilePathIfExists

This function wraps a call to get_custom_file_if_exists from include/utils.php

Parameters
Name Type Description
$file \$file

String of filename to check

Returns
Type Description
\$file String of filename including custom directory if found
methodprotectedgetFavicon( ) : array

Retrieves favicon corresponding to currently requested module

Returns
Type Description
array
methodprotectedgetHelpText( \$module $module ) : \$theTitle

getHelpText

This is a protected function that returns the help text portion. It is called from getModuleTitle.

Parameters
Name Type Description
$module \$module

String the formatted module name

Returns
Type Description
\$theTitle String the HTML for the help text
methodpublicgetJavascriptValidation( ) : void
static

Get JS validation code for views

methodpublicgetMenu( \$module $module = null ) : array

Loads the module shortcuts menu

Parameters
Name Type Description
$module \$module

string optional, can specify module to retrieve menu for if not the current one

Returns
Type Description
array module menu
methodpublicgetMetaDataFile( ) : string

Return the metadata file that will be used by this view.

Returns
Type Description
string File location of the metadata file.
methodpublicgetModuleMenuHTML( ) : void

methodpublicgetModuleTitle( bool $show_help = true ) : \HTML

Return the "breadcrumbs" to display at the top of the page

Parameters
Name Type Description
$show_help bool

optional, true if we show the help links

Returns
Type Description
\HTML string containing breadcrumb title
methodprotectedgetModuleTitleIconPath(  $module ) : void

Parameters
Name Type Description
$module
methodprotectedgetSugarConfigJS( ) : array

Fetch config values to be put into an array for JavaScript

Returns
Type Description
array
methodpublicincludeClassicFile( string $file ) : void

If the view is classic then this method will include the file and setup any global variables.

Parameters
Name Type Description
$file string
methodpublicinit(  $bean = null,  $view_object_map = array() ) : void

Parameters
Name Type Description
$bean
$view_object_map
methodprotectedlogMemoryStatistics( \$newline $newline = '
' )
: \$message

logMemoryStatistics

This function returns a string message containing the memory statistics as well as writes to the memory_usage.log file the memory statistics for the SugarView invocation.

Parameters
Name Type Description
$newline \$newline

String of newline character to use (defaults to )

Returns
Type Description
\$message String formatted message about memory statistics
methodpublicpreDisplay( ) : void

[OVERRIDE] - This method is meant to overidden in a subclass. The purpose of this method is to allow a view to do some preprocessing before the display method is called. This becomes useful when you have a view defined at the application level and then within a module have a sub-view that extends from this application level view. The application level view can do the setup in preDisplay() that is common to itself and any subviews and then the subview can just override display(). If it so desires, can also override preDisplay().

methodprotectedprepareConfigVarForJs( string $key, string $value ) : string

Utility method to convert sugar_config values into a JS acceptable format.

Parameters
Name Type Description
$key string

Config Variable Name

$value string

Config Variable Value

Returns
Type Description
string
methodpublicprocess( ) : void

This method will be called from the controller and is not meant to be overridden.

methodpublicrenderJavascript( ) : void

Documentation was generated by DocBlox 0.18.1.