modules/Home/Dashlets/SugarNewsDashlet/SugarNewsDashlet.php
\SugarNewsDashlet
Basic Dashlet
- Parent(s)
- \iFrameDashlet < \Dashlet
Properties

$allowed_schemes= 'array("http", "https")'
array("http", "https")Details- Type
- n/a
- Inherited_from
- \iFrameDashlet::$$allowed_schemes

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\iFrameDashlet::$$autoRefreshTo support auto refresh all refreshable dashlets that override process() must call processAutoRefresh()
"0"Details- Type
- int
- Inherited_from
- \Dashlet::$$autoRefresh
- Inherited_from
- \iFrameDashlet::$$autoRefresh

$configureTpl= ''modules/Home/Dashlets/SugarNewsDashlet/configure.tpl''
'modules/Home/Dashlets/SugarNewsDashlet/configure.tpl'Details- Type
- n/a

array
$dashletStrings= ''
Language strings, must be loaded at the Dashlet level w/ loadLanguage
Inherited from: \Dashlet::$$dashletStrings\iFrameDashlet::$$dashletStrings- Type
- array
- Inherited_from
- \Dashlet::$$dashletStrings
- Inherited_from
- \iFrameDashlet::$$dashletStrings

$defaultURL= ''http://apps.sugarcrm.com/dashlet/sugarcrm-news-dashlet.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@''
'http://apps.sugarcrm.com/dashlet/sugarcrm-news-dashlet.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@'Details- Type
- n/a

$displayTpl= ''modules/Home/Dashlets/SugarNewsDashlet/display.tpl''
'modules/Home/Dashlets/SugarNewsDashlet/display.tpl'Details- Type
- n/a

bool
$hasScript= 'false'
true if the Dashlet contains javascript
Inherited from: \Dashlet::$$hasScript\iFrameDashlet::$$hasScriptfalseDetails- Type
- bool
- Inherited_from
- \Dashlet::$$hasScript
- Inherited_from
- \iFrameDashlet::$$hasScript

bool
$isConfigPanelClearShown= 'true'
true if the Dashlet configuration options panel has the clear button
Inherited from: \Dashlet::$$isConfigPanelClearShown\iFrameDashlet::$$isConfigPanelClearShowntrueDetails- Type
- bool
- Inherited_from
- \Dashlet::$$isConfigPanelClearShown
- Inherited_from
- \iFrameDashlet::$$isConfigPanelClearShown

bool
$isConfigurable= 'false'
true if the Dashlet has configuration options.
Inherited from: \Dashlet::$$isConfigurable\iFrameDashlet::$$isConfigurablefalseDetails- Type
- bool
- Inherited_from
- \Dashlet::$$isConfigurable
- Inherited_from
- \iFrameDashlet::$$isConfigurable

bool
$isRefreshable= 'true'
true if the Dashlet is refreshable (ie charts that provide their own refresh)
Inherited from: \Dashlet::$$isRefreshable\iFrameDashlet::$$isRefreshabletrueDetails- Type
- bool
- Inherited_from
- \Dashlet::$$isRefreshable
- Inherited_from
- \iFrameDashlet::$$isRefreshable

string
$title= ''Generic Dashlet''
'Generic Dashlet'Details- Type
- string
- Inherited_from
- \Dashlet::$$title
- Inherited_from
- \iFrameDashlet::$$title
Methods

displayOptions(
)
:
voidCalled when Dashlets configuration options are called
Inherited from: \iFrameDashlet::displayOptions()
getAutoRefreshOptions(
)
:
arrayReturns the available auto refresh settings you can set a dashlet to
Inherited from: \Dashlet::getAutoRefreshOptions()\iFrameDashlet::getAutoRefreshOptions()| Type | Description |
|---|---|
| array | options available |

getFooter(
)
:
stringCalled when Dashlet is displayed
Inherited from: \Dashlet::getFooter()\iFrameDashlet::getFooter()| Type | Description |
|---|---|
| string | footer HTML |

getHeader(
string $text
=
''
)
:
stringCalled when Dashlet is displayed
Inherited from: \Dashlet::getHeader()\iFrameDashlet::getHeader()| Name | Type | Description |
|---|---|---|
| $text | string | text after the title |
| Type | Description |
|---|---|
| string | Header html |

getTitle(
string $text
=
''
)
:
string
| Name | Type | Description |
|---|---|---|
| $text | string |
| Type | Description |
|---|---|
| string | HTML |

hasAccess(
)
:
boolOverride this in the subclass. It is used to determine whether the dashlet can be displayed.
Inherited from: \Dashlet::hasAccess()\iFrameDashlet::hasAccess()| Type | Description |
|---|---|
| bool | indicating whether or not the current user has access to display this Dashlet. |

iFrameDashlet(
$id, $options
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $id | ||
| $options |

isAutoRefreshable(
)
:
boolReturns true if the dashlet is auto refreshable
Inherited from: \Dashlet::isAutoRefreshable()\iFrameDashlet::isAutoRefreshable()| Type | Description |
|---|---|
| bool |

loadLanguage(
string $dashletClassname, string $dashletDirectory
=
'modules/Home/Dashlets/'
)
:
voidSets the language strings
Inherited from: \Dashlet::loadLanguage()\iFrameDashlet::loadLanguage()| Name | Type | Description |
|---|---|---|
| $dashletClassname | string | classname of the dashlet |
| $dashletDirectory | string | directory path of the dashlet |

loadOptions(
)
:
arrayGeneric way to retrieve options array from UserPreferences
Inherited from: \Dashlet::loadOptions()\iFrameDashlet::loadOptions()| Type | Description |
|---|---|
| array | options array stored in UserPreferences |

process(
)
:
voidOverride if you need to do pre-processing before display is called
Inherited from: \Dashlet::process()\iFrameDashlet::process()
processAutoRefresh(
int $dashletOffset
=
0
)
:
stringProcesses and displays the auto refresh code for the dashlet
Inherited from: \Dashlet::processAutoRefresh()\iFrameDashlet::processAutoRefresh()| Name | Type | Description |
|---|---|---|
| $dashletOffset | int |
| Type | Description |
|---|---|
| string | HTML code |

saveOptions(
array $req
)
:
arrayOverride this if your dashlet is configurable (this is called when the the configureDashlet form is shown) Filters the array for only the parameters it needs to save
Inherited from: \iFrameDashlet::saveOptions()| Name | Type | Description |
|---|---|---|
| $req | array | the array to pull options from |
| Type | Description |
|---|---|
| array | options array |

setConfigureIcon(
)
:
stringReturns the HTML for the configure icon
Inherited from: \Dashlet::setConfigureIcon()\iFrameDashlet::setConfigureIcon()| Type | Description |
|---|---|
| string | HTML |

setDeleteIcon(
)
:
stringReturns the HTML for the delete icon
Inherited from: \Dashlet::setDeleteIcon()\iFrameDashlet::setDeleteIcon()| Type | Description |
|---|---|
| string | HTML |

setRefreshIcon(
)
:
stringReturns the HTML for the refresh icon
Inherited from: \Dashlet::setRefreshIcon()\iFrameDashlet::setRefreshIcon()| Type | Description |
|---|---|
| string | HTML |

storeOptions(
array $optionsArray
)
:
voidGeneric way to store an options array into UserPreferences
Inherited from: \Dashlet::storeOptions()\iFrameDashlet::storeOptions()| Name | Type | Description |
|---|---|---|
| $optionsArray | array | the array to save |