modules/Charts/Dashlets/MyForecastingChartDashlet/MyForecastingChartDashlet.php
\MyForecastingChartDashlet
Basic Dashlet
- Parent(s)
- \DashletGenericChart < \Dashlet
Properties
object
$_configureSS= ''
smarty object for the generic configuration template
Inherited from: \DashletGenericChart::$$_configureSS- Type
- object
- Inherited_from
- \DashletGenericChart::$$_configureSS
string
$_configureTpl= ''include/Dashlets/DashletGenericChartConfigure.tpl''
location of smarty template file for configuring
Inherited from: \DashletGenericChart::$$_configureTpl'include/Dashlets/DashletGenericChartConfigure.tpl'
Details- Type
- string
- Inherited_from
- \DashletGenericChart::$$_configureTpl
array
$_searchFields= ''
Array of fields and thier defintions that we are searching on
Inherited from: \DashletGenericChart::$$_searchFields- Type
- array
- Inherited_from
- \DashletGenericChart::$$_searchFields
string
$_seedName= ''Forecasts''
Module used in this Dashlet
'Forecasts'
Details- Type
- string
- See
- \DashletGenericChart::$_seedName
int
$autoRefresh= '"0"'
Time period in minutes to refresh the dashlet (0 for never) Do not refresh if $isRefreshable is set to false
Inherited from: \Dashlet::$$autoRefresh\DashletGenericChart::$$autoRefreshTo support auto refresh all refreshable dashlets that override process() must call processAutoRefresh()
"0"
Details- Type
- int
- Inherited_from
- \Dashlet::$$autoRefresh
- Inherited_from
- \DashletGenericChart::$$autoRefresh
array
$dashletStrings= ''
Language strings, must be loaded at the Dashlet level w/ loadLanguage
Inherited from: \Dashlet::$$dashletStrings\DashletGenericChart::$$dashletStrings- Type
- array
- Inherited_from
- \Dashlet::$$dashletStrings
- Inherited_from
- \DashletGenericChart::$$dashletStrings
bool
$hasScript= 'false'
true if the Dashlet contains javascript
Inherited from: \Dashlet::$$hasScript\DashletGenericChart::$$hasScriptfalse
Details- Type
- bool
- Inherited_from
- \Dashlet::$$hasScript
- Inherited_from
- \DashletGenericChart::$$hasScript
\guid
$id= ''
- Type
- \guid
- Inherited_from
- \Dashlet::$$id
- Inherited_from
- \DashletGenericChart::$$id
bool
$isConfigPanelClearShown= 'false'
true if the Dashlet configuration options panel has the clear button
false
Details- Type
- bool
- See
- \Dashlet::$isConfigPanelClearShown
bool
$isConfigurable= 'true'
true if the Dashlet has configuration options.
true
Details- Type
- bool
- See
- \Dashlet::$isConfigurable
bool
$isRefreshable= 'true'
true if the Dashlet is refreshable (ie charts that provide their own refresh)
Inherited from: \DashletGenericChart::$$isRefreshabletrue
Details- Type
- bool
- Inherited_from
- \DashletGenericChart::$$isRefreshable
- See
- \Dashlet::$isRefreshable
Methods
__construct(
int $id, array $options
=
null
)
:
void
Name | Type | Description |
---|---|---|
$id | int | |
$options | array |
constructGroupBy(
)
:
string
Returns the array of group by parameters for SugarChart::$group_by
Inherited from: \DashletGenericChart::constructGroupBy()Type | Description |
---|---|
string | SQL query |
constructQuery(
)
:
string
Returns the built query read to feed into SugarChart::getData()
Inherited from: \DashletGenericChart::constructQuery()Type | Description |
---|---|
string | SQL query |
display(
)
:
string
Displays the Dashlet, must call process() prior to calling this
Type | Description |
---|---|
string | HTML that displays Dashlet |
displayOptions(
)
:
string
Handles displaying the chart dashlet configuration popup window
Inherited from: \DashletGenericChart::displayOptions()Type | Description |
---|---|
string | HTML to return to the browser |
displayScript(
)
:
string
Displays the javascript for the dashlet
Inherited from: \DashletGenericChart::displayScript()Type | Description |
---|---|
string | javascript to use with this dashlet |
getAutoRefreshOptions(
)
:
array
Returns the available auto refresh settings you can set a dashlet to
Inherited from: \Dashlet::getAutoRefreshOptions()\DashletGenericChart::getAutoRefreshOptions()Type | Description |
---|---|
array | options available |
getConfigureSmartyInstance(
)
:
void
Gets the smarty object for the config window. Designed to allow lazy loading the object when it's needed.
Inherited from: \DashletGenericChart::getConfigureSmartyInstance()getFooter(
)
:
string
Called when Dashlet is displayed
Inherited from: \Dashlet::getFooter()\DashletGenericChart::getFooter()Type | Description |
---|---|
string | footer HTML |
getHeader(
string $text
=
''
)
:
string
Called when Dashlet is displayed
Inherited from: \Dashlet::getHeader()\DashletGenericChart::getHeader()Name | Type | Description |
---|---|---|
$text | string | text after the title |
Type | Description |
---|---|
string | Header html |
getSeedBean(
)
:
object
Returns the DashletGenericChart::_seedBean object. Designed to allow lazy loading the object when it's needed.
Inherited from: \DashletGenericChart::getSeedBean()Type | Description |
---|---|
object |
getTitle(
string $text
=
''
)
:
string
Name | Type | Description |
---|---|---|
$text | string |
Type | Description |
---|---|
string | HTML |
hasAccess(
)
:
bool
Override this in the subclass. It is used to determine whether the dashlet can be displayed.
Inherited from: \Dashlet::hasAccess()\DashletGenericChart::hasAccess()Type | Description |
---|---|
bool | indicating whether or not the current user has access to display this Dashlet. |
isAutoRefreshable(
)
:
bool
Returns true if the dashlet is auto refreshable
Inherited from: \Dashlet::isAutoRefreshable()\DashletGenericChart::isAutoRefreshable()Type | Description |
---|---|
bool |
loadLanguage(
string $dashletClassname, string $dashletDirectory
=
'modules/Home/Dashlets/'
)
:
void
Sets the language strings
Inherited from: \Dashlet::loadLanguage()\DashletGenericChart::loadLanguage()Name | Type | Description |
---|---|---|
$dashletClassname | string | classname of the dashlet |
$dashletDirectory | string | directory path of the dashlet |
loadOptions(
)
:
array
Generic way to retrieve options array from UserPreferences
Inherited from: \Dashlet::loadOptions()\DashletGenericChart::loadOptions()Type | Description |
---|---|
array | options array stored in UserPreferences |
process(
)
:
void
Override if you need to do pre-processing before display is called
Inherited from: \Dashlet::process()\DashletGenericChart::process()processAutoRefresh(
int $dashletOffset
=
0
)
:
string
Processes and displays the auto refresh code for the dashlet
Inherited from: \DashletGenericChart::processAutoRefresh()Name | Type | Description |
---|---|---|
$dashletOffset | int |
Type | Description |
---|---|
string | HTML code |
saveOptions(
array $req
)
:
array
Saves the chart config options Filter the $_REQUEST and only save only the needed options
Inherited from: \DashletGenericChart::saveOptions()Name | Type | Description |
---|---|---|
$req | array |
Type | Description |
---|---|
array |
setConfigureIcon(
)
:
string
Returns the HTML for the configure icon
Inherited from: \Dashlet::setConfigureIcon()\DashletGenericChart::setConfigureIcon()Type | Description |
---|---|
string | HTML |
setDeleteIcon(
)
:
string
Returns the HTML for the delete icon
Inherited from: \Dashlet::setDeleteIcon()\DashletGenericChart::setDeleteIcon()Type | Description |
---|---|
string | HTML |
setRefreshIcon(
)
:
string
Returns the HTML for the refresh icon
Inherited from: \DashletGenericChart::setRefreshIcon()Type | Description |
---|---|
string | HTML |
storeOptions(
array $optionsArray
)
:
void
Generic way to store an options array into UserPreferences
Inherited from: \Dashlet::storeOptions()\DashletGenericChart::storeOptions()Name | Type | Description |
---|---|---|
$optionsArray | array | the array to save |