modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php
\JotPadDashlet
Basic Dashlet
- Parent(s)
- \Dashlet
Properties
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::$$autoRefreshTo support auto refresh all refreshable dashlets that override process() must call processAutoRefresh()
"0"
Details- Type
- int
- Inherited_from
- \Dashlet::$$autoRefresh
array
$dashletStrings= ''
Language strings, must be loaded at the Dashlet level w/ loadLanguage
Inherited from: \Dashlet::$$dashletStrings- Type
- array
- Inherited_from
- \Dashlet::$$dashletStrings
bool
$isConfigPanelClearShown= 'true'
true if the Dashlet configuration options panel has the clear button
Inherited from: \Dashlet::$$isConfigPanelClearShowntrue
Details- Type
- bool
- Inherited_from
- \Dashlet::$$isConfigPanelClearShown
bool
$isConfigurable= 'false'
false
Details- Type
- bool
- Inherited_from
- \Dashlet::$$isConfigurable
bool
$isRefreshable= 'true'
true if the Dashlet is refreshable (ie charts that provide their own refresh)
Inherited from: \Dashlet::$$isRefreshabletrue
Details- Type
- bool
- Inherited_from
- \Dashlet::$$isRefreshable
string
$title= ''Generic Dashlet''
'Generic Dashlet'
Details- Type
- string
- Inherited_from
- \Dashlet::$$title
Methods
JotPadDashlet(
\guid $id, array $def
)
:
void
Constructor
Name | Type | Description |
---|---|---|
$id | \guid | id for the current dashlet (assigned from Home module) |
$def | array | options saved for this dashlet |
- Global
- string current language
displayOptions(
)
:
string
Displays the configuration form for the dashlet
Type | Description |
---|---|
string | html to display form |
displayScript(
)
:
string
Displays the javascript for the dashlet
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()Type | Description |
---|---|
array | options available |
getHeader(
string $text
=
''
)
:
string
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(
)
:
bool
Override this in the subclass. It is used to determine whether the dashlet can be displayed.
Inherited from: \Dashlet::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()Type | Description |
---|---|
bool |
loadLanguage(
string $dashletClassname, string $dashletDirectory
=
'modules/Home/Dashlets/'
)
:
void
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()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()processAutoRefresh(
int $dashletOffset
=
0
)
:
string
Processes and displays the auto refresh code for the dashlet
Inherited from: \Dashlet::processAutoRefresh()Name | Type | Description |
---|---|---|
$dashletOffset | int |
Type | Description |
---|---|
string | HTML code |
saveOptions(
array $req
)
:
array
called to filter out $_REQUEST object when the user submits the configure dropdown
Name | Type | Description |
---|---|---|
$req | array | $_REQUEST |
Type | Description |
---|---|
array | filtered options to save |
saveText(
)
:
void
Used to save text on textarea blur. Accessed via Home/CallMethodDashlet.php This is an example of how to to call a custom method via ajax
storeOptions(
array $optionsArray
)
:
void
Generic way to store an options array into UserPreferences
Inherited from: \Dashlet::storeOptions()Name | Type | Description |
---|---|---|
$optionsArray | array | the array to save |