include/MVC/View/views/view.wirelesssave.php

Show: inherited
Table of Contents

\ViewWirelesssave

Package: SugarCRM

ViewWirelesslist extends SugarWirelessView and is the view for wireless list views.

The generic and reusable features of wireless views are contained in the base class. This includes the module select list, the saved search options and form, the search form, the subpanel data, the header, and the footer of the wireless views.

Parent(s)
\SugarWirelessView < \SugarView
Children
\CallsViewWirelesssave
\MeetingsViewWirelesssave

Properties

Propertypublic  $action= ''index''

The name of the current action.

Default value'index'Details
Type
n/a
Propertypublic  $bean= 'null'
Default valuenullDetails
Type
n/a
Inherited_from
\SugarView::$$bean  
Inherited_from
\SugarWirelessView::$$bean  
Propertypublic  $errors= 'array()'
inherited

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

Inherited from: \SugarView::$$errors\SugarWirelessView::$$errors
Default valuearray()Details
Type
n/a
Inherited_from
\SugarView::$$errors  
Inherited_from
\SugarWirelessView::$$errors  
Propertypublic  $fileResources= ''
Details
Type
n/a
Inherited_from
\SugarView::$$fileResources  
Inherited_from
\SugarWirelessView::$$fileResources  
Propertypublic  $module= ''Home''

The name of the current module.

Default value'Home'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,)'
inherited

Options for what UI elements to hide/show/

Inherited from: \SugarView::$$options\SugarWirelessView::$$options
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
Inherited_from
\SugarView::$$options  
Inherited_from
\SugarWirelessView::$$options  
Propertypublic  $record= ''''

The id of the current record.

Default value''Details
Type
n/a
Propertypublic  $responseTime= ''
Details
Type
n/a
Inherited_from
\SugarView::$$responseTime  
Inherited_from
\SugarWirelessView::$$responseTime  
Propertypublic  $return_action= 'null'

The name of the return action.

Default valuenullDetails
Type
n/a
Propertypublic  $return_id= 'null'

The id of the return record.

Default valuenullDetails
Type
n/a
Propertypublic  $return_module= 'null'

The name of the return module.

Default valuenullDetails
Type
n/a
Propertypublic  $ss= 'null'
inherited

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

Inherited from: \SugarView::$$ss\SugarWirelessView::$$ss
Default valuenullDetails
Type
n/a
Inherited_from
\SugarView::$$ss  
Inherited_from
\SugarWirelessView::$$ss  
Propertypublic  $subpanel_layout_defs= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\SugarWirelessView::$$subpanel_layout_defs  
Propertypublic  $suppressDisplayErrors= 'false'
inherited

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

Inherited from: \SugarView::$$suppressDisplayErrors\SugarWirelessView::$$suppressDisplayErrors
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarView::$$suppressDisplayErrors  
Inherited_from
\SugarWirelessView::$$suppressDisplayErrors  
Propertypublic  $type= 'null'
Default valuenullDetails
Type
n/a
Inherited_from
\SugarView::$$type  
Inherited_from
\SugarWirelessView::$$type  
Propertypublic  $view_object_map= 'array()'
inherited

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.

Inherited from: \SugarView::$$view_object_map\SugarWirelessView::$$view_object_map
Default valuearray()Details
Type
n/a
Inherited_from
\SugarView::$$view_object_map  
Inherited_from
\SugarWirelessView::$$view_object_map  
PropertypublicArray  $wl_mod_create_list= ''
inherited

wl_mod_create_list includes the list of modules that we can add new unrelated records to

of module stringsInherited from: \SugarWirelessView::$$wl_mod_create_list
Details
Type
Array
Inherited_from
\SugarWirelessView::$$wl_mod_create_list  
PropertypublicArray  $wl_mod_select_list= ''
inherited

wl_mod_select_list includes the list of modules to be added as options to the navigation select list

of module stringsInherited from: \SugarWirelessView::$$wl_mod_select_list
Details
Type
Array
Inherited_from
\SugarWirelessView::$$wl_mod_select_list  

Methods

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

Constructor which will peform the setup.

Inherited from: \SugarView::SugarView()\SugarWirelessView::SugarView()
Parameters
Name Type Description
$bean
$view_object_map
methodpublic__construct( ) : \none

Constructor for the view, it runs the constructor of SugarWirelessView

  1. sets the view options
  2. achieves the global module select list
  3. calls the SugarView constructor
  4. sets a smarty variable with the global action
Returns
Type Description
\none
methodprotected_buildModuleList( ) : void
methodprivate_calculateFooterMetrics( ) : void
methodprotected_checkModule( ) : void
inherited

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

Inherited from: \SugarView::_checkModule()\SugarWirelessView::_checkModule()
methodprotected_displayJavascript( ) : void
inherited

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

Inherited from: \SugarView::_displayJavascript()\SugarWirelessView::_displayJavascript()
methodprotected_displayLoginJS( ) : void
methodprotected_displaySubPanels( ) : void
inherited

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

Inherited from: \SugarView::_displaySubPanels()\SugarWirelessView::_displaySubPanels()
methodprotected_getModLanguageJS( ) : void
methodprotected_getModuleTab( ) : void
inherited

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

Inherited from: \SugarView::_getModuleTab()\SugarWirelessView::_getModuleTab()
methodprotected_getModuleTitleListParam( bool $browserTitle = false ) : string
inherited

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

Inherited from: \SugarView::_getModuleTitleListParam()\SugarWirelessView::_getModuleTitleListParam()
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
inherited

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

Inherited from: \SugarView::_getModuleTitleParams()\SugarWirelessView::_getModuleTitleParams()
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
inherited

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

Inherited from: \SugarView::_getOption()\SugarWirelessView::_getOption()
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
inherited

track Private function to track information about the view request

Inherited from: \SugarView::_track()\SugarWirelessView::_track()
methodprotected_trackView( ) : void
methodprotectedaction_save( ) : void

Perform the actual save

methodpublicbean_details(  $view ) : void
inherited

Public function that attains the bean detail and sets up an array for Smarty consumption.

Inherited from: \SugarWirelessView::bean_details()
Parameters
Name Type Description
$view
methodprotectedcheckEditPermissions( ) : void
inherited

Inherited from: \SugarWirelessView::checkEditPermissions()
methodpubliccheckPostMaxSizeError( ) : boolean
inherited

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)

Inherited from: \SugarView::checkPostMaxSizeError()\SugarWirelessView::checkPostMaxSizeError()
Returns
Type Description
boolean indicating true or false
methodpublicdisplay( ) : void

Public function that handles the display of the wireless list view.

methodpublicdisplayErrors( ) : void
inherited

This method will display the errors on the page.

Inherited from: \SugarView::displayErrors()\SugarWirelessView::displayErrors()
methodpublicdisplayFooter( ) : void
inherited

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

Inherited from: \SugarView::displayFooter()\SugarWirelessView::displayFooter()
methodpublicdisplayHeader(  $retModTabs = false ) : void
inherited

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

Inherited from: \SugarView::displayHeader()\SugarWirelessView::displayHeader()
Parameters
Name Type Description
$retModTabs
methodprotectedfetchTemplate( \$file $file ) : \$content

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
inherited

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

Inherited from: \SugarView::getBreadCrumbSymbol()\SugarWirelessView::getBreadCrumbSymbol()
Returns
Type Description
string
methodpublicgetBrowserTitle( ) : string
inherited

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

Inherited from: \SugarView::getBrowserTitle()\SugarWirelessView::getBrowserTitle()
Returns
Type Description
string
methodprotectedgetCustomFilePathIfExists( \$file $file ) : \$file

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
methodpublicgetDataForSubpanel(  $parent,  $subpanel,  $subpaneldefs ) : void
inherited

Inherited from: \SugarWirelessView::getDataForSubpanel()
Parameters
Name Type Description
$parent
$subpanel
$subpaneldefs
methodprotectedgetFavicon( ) : array
inherited

Retrieves favicon corresponding to currently requested module

Inherited from: \SugarView::getFavicon()\SugarWirelessView::getFavicon()
Returns
Type Description
array
methodprotectedgetHelpText( \$module $module ) : \$theTitle
inherited

getHelpText

Inherited from: \SugarView::getHelpText()\SugarWirelessView::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
staticinherited

Get JS validation code for views

Inherited from: \SugarView::getJavascriptValidation()\SugarWirelessView::getJavascriptValidation()
methodpublicgetMenu( \$module $module = null ) : array
inherited

Loads the module shortcuts menu

Inherited from: \SugarView::getMenu()\SugarWirelessView::getMenu()
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 $view ) : array
inherited

Retrieve the meta data file and module name for a particular view

Inherited from: \SugarWirelessView::getMetaDataFile()
Parameters
Name Type Description
$view string
Returns
Type Description
array filename and module name information
methodpublicgetModuleMenuHTML( ) : void
methodpublicgetModuleTitle( bool $show_help = true ) : \HTML
inherited

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

Inherited from: \SugarView::getModuleTitle()\SugarWirelessView::getModuleTitle()
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
methodpublicgetSubpanelDefs(  $layout_def_key = "",  $original_only = false ) : void
inherited

Inherited from: \SugarWirelessView::getSubpanelDefs()
Parameters
Name Type Description
$layout_def_key
$original_only
methodprotectedgetSugarConfigJS( ) : array
inherited

Fetch config values to be put into an array for JavaScript

Inherited from: \SugarView::getSugarConfigJS()\SugarWirelessView::getSugarConfigJS()
Returns
Type Description
array
methodprotectedget_field_defs( ) : void
inherited

Inherited from: \SugarWirelessView::get_field_defs()
methodpublicincludeClassicFile( string $file ) : void
inherited

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

Inherited from: \SugarView::includeClassicFile()\SugarWirelessView::includeClassicFile()
Parameters
Name Type Description
$file string
methodpublicinit(  $bean = null,  $view_object_map = array() ) : void
inherited

Override the default init() method; build the module select list after calling it

Inherited from: \SugarWirelessView::init()
Parameters
Name Type Description
$bean
$view_object_map
methodprotectedloadPropertiesFromRequest( ) : void

Set properties on the Controller from the $_REQUEST

methodprotectedlogMemoryStatistics( \$newline $newline = '
' )
: \$message

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
methodprotectedpost_save( ) : void

Specify what happens after the save has occurred.

methodpublicpreDisplay( ) : void
inherited

[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().

Inherited from: \SugarView::preDisplay()\SugarWirelessView::preDisplay()
methodprotectedpre_save( ) : void

Do some processing before saving the bean to the database.

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

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

Inherited from: \SugarView::prepareConfigVarForJs()\SugarWirelessView::prepareConfigVarForJs()
Parameters
Name Type Description
$key string

Config Variable Name

$value string

Config Variable Value

Returns
Type Description
string
methodpublicprocess( ) : void
inherited

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

Inherited from: \SugarView::process()\SugarWirelessView::process()
methodprotectedredirect(  $url ) : void

Parameters
Name Type Description
$url
methodpublicrenderJavascript( ) : void
methodprivateset_wl_module_select_list( ) : \none
inherited

Private function that determines the module list

Inherited from: \SugarWirelessView::set_wl_module_select_list()

This function reads the static metadata file that contains the list of included modules for SugarWireless. It will form a select list that gets consumed by the views. Also, it will do a check to make sure the user has access to the module.

Returns
Type Description
\none
methodpublicsetup(  $module = '' ) : void

Parameters
Name Type Description
$module
methodprotectedsetup_detail_field(  $field ) : void
inherited

Inherited from: \SugarWirelessView::setup_detail_field()
Parameters
Name Type Description
$field
methodprivatesetup_edit_field(  $field ) : void
inherited

Inherited from: \SugarWirelessView::setup_edit_field()
Parameters
Name Type Description
$field
methodpublicwl_footer(  $footerTpl = 'include/SugarWireless/tpls/wirelessfooter.tpl' ) : void
inherited

Public function that displays the wireless view footer

Inherited from: \SugarWirelessView::wl_footer()
Parameters
Name Type Description
$footerTpl
methodprotectedwl_get_metadata_location(  $view ) : void
Parameters
Name Type Description
$view
methodprotectedwl_get_subpanel_data( \SugarBean $child_seed, String $related_field, \aSubPanel $subpanel = null ) :
inherited

Protected function that retrieves subpanel data for a given bean

Inherited from: \SugarWirelessView::wl_get_subpanel_data()

This function will return an array with the subpanel data for a bean. The function needs to attain the relationship and modify the query. It will inject team security code into the query if that is needed, and construct a final query. Finally, it will call the list_query function to attain the subpanel data list.

Parameters
Name Type Description
$child_seed \SugarBean
  • $child_seed the subpanel module bean
$related_field String
  • $related_field the link field to use
$subpanel \aSubPanel
  • $subpanel_def defninition of this subpanel
methodpublicwl_header(  $welcome = false,  $headerTpl = 'include/SugarWireless/tpls/wirelessheader.tpl' ) : void
inherited

Public function that displays the wireless view header.

Inherited from: \SugarWirelessView::wl_header()
Parameters
Name Type Description
$welcome
$headerTpl
methodpublicwl_required_edit_fields( ) : void
methodpublicwl_saved_search_form( ) : void
inherited

Public function that consumes the saved search options private function and returns the saved search form.

Inherited from: \SugarWirelessView::wl_saved_search_form()
methodprivatewl_saved_search_options( ) : \html
inherited

Private function to determine the saved searches for particular modules

Inherited from: \SugarWirelessView::wl_saved_search_options()

This function will take the current user id and the current module, and determine if there are any saved searches available. If yes, then the function will return a select list with the saved searches.

Returns
Type Description
\html for select list of saved searches
methodpublicwl_search_form(  $searchdefs = array() ) : void
inherited

Public function that reads search metadata and creates an appropriate search form based on the metadata.

Inherited from: \SugarWirelessView::wl_search_form()
Parameters
Name Type Description
$searchdefs
methodpublicwl_select_list(  $selectListTpl = 'include/SugarWireless/tpls/wirelessselectlist.tpl' ) : void
inherited

Public function to display the select list

Inherited from: \SugarWirelessView::wl_select_list()
Parameters
Name Type Description
$selectListTpl
Documentation was generated by DocBlox 0.18.1.