html_panel module - Hooks created by the html_panel module
- These hooks pertain to management of custom_widget and custom_page content.
hook_html_panel_make_widgets
Parameters:
$delta => optional int - only return result['widgets'][$delta]
Returns:
array(
'module_name' => array(
0.. OR $delta => array(
'title' => 'Human readable title',
'body' => '<p>HTML body</p>',
'location' => 1...4, //default location
'weight' => -50...50, // default weight
'settings_path' => 'manage/path', // path to settings/management page
'enabled' => 0|1, // is this widget enabled by default?
'display_title' => 0|1, // Is the display_title option enabled by default?
)
)
)
Description:
Create html_panel widgets associated with this module.
hook_html_panel_uncacheable_widgets
Parameters:
none
Returns:
array(
'module_name' => array(0, 3, ...),
)
Description
Specify widgets which should be rebuilt every time they are displayed. module_name must match an implementation of hook_html_panel_make_widgets. The integers in the sub-array must match widget deltas.
html_panel_update_widget
Parameters:
$module => 'module_name', (optional)
$delta => optional int - passed through to hook_html_panel_make_widgets
Returns:
Description:
Tells html_panel that 1+ of this module's widgets are outdated and hook_html_panel_make_widgets needs to be called. Call this whenever something happens that may change the contents of a widget (e.g. updating their mailing_list)
hook_html_panel_update_widget
Parameters:
none
Returns:
none
Description:
This hook is invoked whenever in html_panel_init when the html_panel_widget_outdated variable is detected. Modules can use it to detect if their on widgets are outdated and force them to be updated by invoking html_panel_update_widget.
html_panel_pages
Parameters:
Returns:
array(
'path/to/content' => 'Human-readable Name',
...
)
Description:
Return all the publicly-viewable pages associated with this module so
html_panel_list_pages can display them.