You are here

function commerce_reports_block_view in Commerce Reporting 7.4

Same name and namespace in other branches
  1. 7.3 commerce_reports.module \commerce_reports_block_view()

Implements hook_block_view().

Implementation of the custom blocks defined by commerce_reports.

File

./commerce_reports.module, line 160
Module file for Commerce Reports.

Code

function commerce_reports_block_view($delta = '') {
  module_load_include('inc', 'commerce_reports', 'commerce_reports.blocks');
  switch ($delta) {
    case 'commerce_reports_sales':
      return commerce_reports_sales();
    case 'commerce_reports_customers':
      $block_render = module_invoke('views', 'block_view', 'f3f98e42ba2d4d3103b95e9199cf48fe');
      return array(
        'title' => t('Customer statistics'),
        'content' => $block_render['content'],
      );
  }
  return NULL;
}