function opigno_lrs_stats_dashboard_total_number_of_page_view_form in Opigno TinCan API 7
Implements hook_form().
1 string reference to 'opigno_lrs_stats_dashboard_total_number_of_page_view_form'
- total_number_of_page_view.tpl.php in modules/
opigno_tincan_api_stats/ templates/ dashboard/ widgets/ total_number_of_page_view/ total_number_of_page_view.tpl.php - Opigno Learning Record Store stats - Dashboard - Total number of page view template file
File
- modules/
opigno_tincan_api_stats/ includes/ dashboard/ total_number_of_page_view_form.inc, line 6
Code
function opigno_lrs_stats_dashboard_total_number_of_page_view_form(array $form, array &$form_state) {
$opigno_lrs = variable_get('opigno_lrs_stats_dashboard_total_number_of_page_view_form_values');
$form['display_period'] = array(
'#type' => 'select',
'#options' => array(
OPIGNO_LRS_STATS_CURRENT_WEEK_AGGREGATE_DAY => t('Current week') . '/' . t('day'),
OPIGNO_LRS_STATS_CURRENT_MONTH_AGGREGATE_DAY => t('Current month') . '/' . t('day'),
OPIGNO_LRS_STATS_CURRENT_YEAR_AGGREGATE_DAY => t('Current year') . '/' . t('day'),
OPIGNO_LRS_STATS_CURRENT_YEAR_AGGREGATE_MONTH => t('Current year') . '/' . t('month'),
OPIGNO_LRS_STATS_FOREVER_AGGREGATE_DAY => t('Forever') . '/' . t('day'),
OPIGNO_LRS_STATS_FOREVER_AGGREGATE_MONTH => t('Forever') . '/' . t('month'),
OPIGNO_LRS_STATS_FOREVER_AGGREGATE_YEAR => t('Forever') . '/' . t('year'),
),
'#ajax' => array(
'callback' => 'opigno_lrs_stats_dashboard_total_number_of_page_view_form_ajax_submit',
'wrapper' => 'lrs-stats-widget-dashboard-number-page-view',
'method' => 'replace',
),
'#default_value' => $opigno_lrs['display_period'],
);
return $form;
}