You are here

function opigno_statistics_app_present_user_total_number_of_page_view in Opigno Statistics App 7

Present user total number of page view

Output example

array( 'graph_config' => array( 'element' => 'opigno-statistics-app-user-widget-page-view-chart', 'data' => array( array('day' => '2015-01-01', 'value' => 4), array('day' => '2015-01-02', 'value' => 123), array('day' => '2015-01-03', 'value' => 0), array('day' => '2015-01-04', 'value' => 455), array('day' => '2015-01-05', 'value' => 20) ), 'resize' => true, 'xLabels' => array('day'), 'xkey' => 'day', 'ykeys' => array('value'), 'labels' => array('Number of view per day'), 'xLabelAngle' => -90 ) );

Parameters

int $course_id:

int $month_year:

boolean $filter_month:

Return value

array

1 call to opigno_statistics_app_present_user_total_number_of_page_view()
opigno_statistics_app_user_statistics_page in includes/user/user.pages.inc

File

includes/user/presenters.inc, line 58

Code

function opigno_statistics_app_present_user_total_number_of_page_view($uid, $month_year, $filter_month) {
  $data = opigno_statistics_app_query_user_total_number_of_page_view($uid, $month_year, $filter_month);
  if (empty($data)) {
    $data = array(
      array(
        'day' => gmdate("Y-m-d", $month_year + 86400),
        'value' => 0,
      ),
    );
  }
  return array(
    'graph_config' => array(
      'element' => 'opigno-statistics-app-user-widget-page-view-chart',
      'data' => $data,
      'resize' => true,
      'xLabels' => $filter_month ? array(
        'day',
      ) : array(
        'month',
      ),
      'xkey' => 'day',
      'ykeys' => array(
        'value',
      ),
      'labels' => array(
        t('Number of view per day'),
      ),
      'xLabelAngle' => -90,
    ),
  );
}