modules/Project/views/view.templatesdetail.php
\ProjectViewTemplatesDetail
Default view class for handling DetailViews
- Parent(s)
- \ViewDetail < \SugarView
Properties
$action= ''''
''
Details- Type
- n/a
- Inherited_from
- \SugarView::$$action
- Inherited_from
- \ViewDetail::$$action
$bean= 'null'
null
Details- Type
- n/a
- Inherited_from
- \SugarView::$$bean
- Inherited_from
- \ViewDetail::$$bean
\DetailView2
$dv= ''
- Type
- \DetailView2
- Inherited_from
- \ViewDetail::$$dv
$errors= 'array()'
Any errors that occured this can either be set by the view or the controller or the model
Inherited from: \SugarView::$$errors\ViewDetail::$$errorsarray()
Details- Type
- n/a
- Inherited_from
- \SugarView::$$errors
- Inherited_from
- \ViewDetail::$$errors
$fileResources= ''
- Type
- n/a
- Inherited_from
- \SugarView::$$fileResources
- Inherited_from
- \ViewDetail::$$fileResources
$module= ''''
''
Details- Type
- n/a
- Inherited_from
- \SugarView::$$module
- Inherited_from
- \ViewDetail::$$module
$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/
Inherited from: \SugarView::$$options\ViewDetail::$$optionsarray('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
- \ViewDetail::$$options
$responseTime= ''
- Type
- n/a
- Inherited_from
- \SugarView::$$responseTime
- Inherited_from
- \ViewDetail::$$responseTime
$ss= 'null'
Sugar_Smarty. This is useful if you have a view and a subview you can share the same smarty object.
Inherited from: \SugarView::$$ss\ViewDetail::$$ssnull
Details- Type
- n/a
- Inherited_from
- \SugarView::$$ss
- Inherited_from
- \ViewDetail::$$ss
$suppressDisplayErrors= 'false'
Set to true if you do not want to display errors from SugarView::displayErrors(); instead they will be returned
Inherited from: \SugarView::$$suppressDisplayErrors\ViewDetail::$$suppressDisplayErrorsfalse
Details- Type
- n/a
- Inherited_from
- \SugarView::$$suppressDisplayErrors
- Inherited_from
- \ViewDetail::$$suppressDisplayErrors
$type= ''detail''
'detail'
Details- Type
- n/a
- Inherited_from
- \ViewDetail::$$type
- See
- \SugarView::$type
$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.
Inherited from: \SugarView::$$view_object_map\ViewDetail::$$view_object_maparray()
Details- Type
- n/a
- Inherited_from
- \SugarView::$$view_object_map
- Inherited_from
- \ViewDetail::$$view_object_map
Methods
SugarView(
$bean
=
null, $view_object_map
=
array()
)
:
void
Constructor which will peform the setup.
Inherited from: \SugarView::SugarView()\ViewDetail::SugarView()Name | Type | Description |
---|---|---|
$bean | ||
$view_object_map |
_calculateFooterMetrics(
)
:
void
_checkModule(
)
:
void
Checks to see if the module name passed is valid; dies if it is not
Inherited from: \SugarView::_checkModule()\ViewDetail::_checkModule()_displayJavascript(
)
:
void
Called from process(). This method will display the correct javascript.
Inherited from: \SugarView::_displayJavascript()\ViewDetail::_displayJavascript()_getModuleTab(
)
:
void
Returns the module name which should be highlighted in the module menu
Inherited from: \SugarView::_getModuleTab()\ViewDetail::_getModuleTab()_getModuleTitleListParam(
bool $browserTitle
=
false
)
:
string
Returns the portion of the array that will represent the listview in the breadcrumb
Inherited from: \SugarView::_getModuleTitleListParam()\ViewDetail::_getModuleTitleListParam()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 |
Type | Description |
---|---|
string |
_getModuleTitleParams(
bool $browserTitle
=
false
)
:
array
Returns an array composing of the breadcrumbs to use for the module title
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 |
Type | Description |
---|---|
array |
_getOption(
string $option, bool $default
=
false
)
:
bool
private method used in process() to determine the value of a passed in option
Inherited from: \SugarView::_getOption()\ViewDetail::_getOption()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 |
Type | Description |
---|---|
bool | - the value of the option |
_track(
)
:
void
track Private function to track information about the view request
Inherited from: \SugarView::_track()\ViewDetail::_track()checkPostMaxSizeError(
)
:
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)
Inherited from: \SugarView::checkPostMaxSizeError()\ViewDetail::checkPostMaxSizeError()Type | Description |
---|---|
boolean | indicating true or false |
display(
)
:
void
[OVERRIDE] - This method is meant to overidden in a subclass. This method will handle the actual display logic of the view.
displayErrors(
)
:
void
This method will display the errors on the page.
Inherited from: \SugarView::displayErrors()\ViewDetail::displayErrors()displayFooter(
)
:
void
Called from process(). This method will display the footer on the page.
Inherited from: \SugarView::displayFooter()\ViewDetail::displayFooter()displayHeader(
$retModTabs
=
false
)
:
void
Displays the header on section of the page; basically everything before the content
Inherited from: \SugarView::displayHeader()\ViewDetail::displayHeader()Name | Type | Description |
---|---|---|
$retModTabs |
fetchTemplate(
\$file $file
)
:
\$content
This function wraps the call to the fetch function of the Smarty variable for the view
Name | Type | Description |
---|---|---|
$file | \$file | String path of the file to fetch |
Type | Description |
---|---|
\$content | String content from resulting Smarty fetch operation on template |
getBreadCrumbSymbol(
)
:
string
Returns the correct breadcrumb symbol according to theme's directionality setting
Inherited from: \SugarView::getBreadCrumbSymbol()\ViewDetail::getBreadCrumbSymbol()Type | Description |
---|---|
string |
getBrowserTitle(
)
:
string
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()\ViewDetail::getBrowserTitle()Type | Description |
---|---|
string |
getCustomFilePathIfExists(
\$file $file
)
:
\$file
getCustomFilePathIfExists
Inherited from: \SugarView::getCustomFilePathIfExists()\ViewDetail::getCustomFilePathIfExists()This function wraps a call to get_custom_file_if_exists from include/utils.php
Name | Type | Description |
---|---|---|
$file | \$file | String of filename to check |
Type | Description |
---|---|
\$file | String of filename including custom directory if found |
getFavicon(
)
:
array
Retrieves favicon corresponding to currently requested module
Inherited from: \SugarView::getFavicon()\ViewDetail::getFavicon()Type | Description |
---|---|
array |
getHelpText(
\$module $module
)
:
\$theTitle
This is a protected function that returns the help text portion. It is called from getModuleTitle.
Name | Type | Description |
---|---|---|
$module | \$module | String the formatted module name |
Type | Description |
---|---|
\$theTitle | String the HTML for the help text |
getJavascriptValidation(
)
:
void
Get JS validation code for views
Inherited from: \SugarView::getJavascriptValidation()\ViewDetail::getJavascriptValidation()getMenu(
\$module $module
=
null
)
:
array
Loads the module shortcuts menu
Inherited from: \SugarView::getMenu()\ViewDetail::getMenu()Name | Type | Description |
---|---|---|
$module | \$module | string optional, can specify module to retrieve menu for if not the current one |
Type | Description |
---|---|
array | module menu |
getMetaDataFile(
)
:
string
Return the metadata file that will be used by this view.
Inherited from: \SugarView::getMetaDataFile()\ViewDetail::getMetaDataFile()Type | Description |
---|---|
string | File location of the metadata file. |
getModuleTitle(
bool $show_help
=
true
)
:
\HTML
Return the "breadcrumbs" to display at the top of the page
Inherited from: \SugarView::getModuleTitle()\ViewDetail::getModuleTitle()Name | Type | Description |
---|---|---|
$show_help | bool | optional, true if we show the help links |
Type | Description |
---|---|
\HTML | string containing breadcrumb title |
getSugarConfigJS(
)
:
array
Fetch config values to be put into an array for JavaScript
Inherited from: \SugarView::getSugarConfigJS()\ViewDetail::getSugarConfigJS()Type | Description |
---|---|
array |
includeClassicFile(
string $file
)
:
void
If the view is classic then this method will include the file and setup any global variables.
Inherited from: \SugarView::includeClassicFile()\ViewDetail::includeClassicFile()Name | Type | Description |
---|---|---|
$file | string |
init(
$bean
=
null, $view_object_map
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$bean | ||
$view_object_map |
logMemoryStatistics(
\$newline $newline
=
'
'
)
:
\$message
logMemoryStatistics
Inherited from: \SugarView::logMemoryStatistics()\ViewDetail::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.
Name | Type | Description |
---|---|---|
$newline | \$newline | String of newline character to use (defaults to br>) |
Type | Description |
---|---|
\$message | String formatted message about memory statistics |
preDisplay(
)
:
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().
Inherited from: \ViewDetail::preDisplay()prepareConfigVarForJs(
string $key, string $value
)
:
string
Utility method to convert sugar_config values into a JS acceptable format.
Inherited from: \SugarView::prepareConfigVarForJs()\ViewDetail::prepareConfigVarForJs()Name | Type | Description |
---|---|---|
$key | string | Config Variable Name |
$value | string | Config Variable Value |
Type | Description |
---|---|
string |
process(
)
:
void
This method will be called from the controller and is not meant to be overridden.
Inherited from: \SugarView::process()\ViewDetail::process()