function hook_farm_dashboard_panes in farmOS 7
Same name and namespace in other branches
- 2.x modules/core/ui/dashboard/farm_ui_dashboard.api.php \hook_farm_dashboard_panes()
Defines farm dashboard panes.
Return value
array Returns an array of farm dashboard pane configurations.
Related topics
4 functions implement hook_farm_dashboard_panes()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- farm_calendar_farm_dashboard_panes in modules/
farm/ farm_calendar/ farm_calendar.farm_dashboard.inc - Implements hook_farm_dashboard_panes().
- farm_log_farm_dashboard_panes in modules/
farm/ farm_log/ farm_log.farm_dashboard.inc - Implements hook_farm_dashboard_panes().
- farm_metrics_farm_dashboard_panes in modules/
farm/ farm_metrics/ farm_metrics.farm_dashboard.inc - Implements hook_farm_dashboard_panes().
- farm_plan_farm_dashboard_panes in modules/
farm/ farm_plan/ farm_plan.farm_dashboard.inc - Implements hook_farm_dashboard_panes().
1 invocation of hook_farm_dashboard_panes()
- farm_dashboard_page_callback in modules/
farm/ farm_dashboard/ farm_dashboard.module - Farm dashboard page callback.
File
- modules/
farm/ farm_dashboard/ farm_dashboard.api.php, line 30 - Hooks provided by farm_dashboard.
Code
function hook_farm_dashboard_panes() {
return array(
// A pane is defined with an associative array, keyed with a unique pane
// machine name.
'my_pane' => array(
// Specify a 'view' and 'view_display ID' to automatically load a View.
// This will take precedence over 'title' and 'callback' below.
'view' => 'my_view',
'view_display_id' => 'block_1',
// Specify the title and callback function that produces output.
'title' => t('My pane title'),
'callback' => 'my_callback_function',
// Optionally specify a group and weight for display sorting.
'group' => 'custom_group',
'weight' => 100,
),
);
}