You are here

function statspro_get_period_items in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 statspro.module \statspro_get_period_items()

Get items for period selection.

Return value

array

5 calls to statspro_get_period_items()
set_default_session_values in ./statspro_settings.inc
Helper function to set initial values for session variables related to per report period definitions.
StatisticsProTestCase::testMainTests in tests/statspro.test
statspro_get_period_info in ./statspro_settings.inc
Returns the presentable period name and returns a period definition as number of days for custom_days period.
statspro_settings_form in ./statspro_settings.inc
Form generating function for report settings.
statspro_settings_form_validate in ./statspro_settings.inc
Implementation of hook_modulename_validate() for settings form.

File

./statspro.module, line 271
Main module of Statistcs pro module

Code

function statspro_get_period_items() {
  return array(
    'today' => t('Today'),
    'yesterday' => t('Yesterday'),
    'week_current' => t('Week, current'),
    'week_last' => t('Week, last'),
    'week_last2' => t('Week, before last'),
    'month_current' => t('Month, current'),
    'month_last' => t('Month, last'),
    'month_last3' => t('Month, last 3'),
    'month_last6' => t('Month, last 6'),
    'quarter_current' => t('Quarter, current'),
    'quarter_last' => t('Quarter, last'),
    'year_current' => t('Year, current'),
    'year_last' => t('Year, last'),
    'custom_days' => t('Custom number of days'),
  );
}