You are here

heartbeat_views.views_default.inc in Heartbeat 6.3

Same filename and directory in other branches
  1. 6.4 views/heartbeat_views.views_default.inc

File

views/heartbeat_views.views_default.inc
View source
<?php

// $Id $

/**
 * Implementation of hook_views_default_views()
 *
 * @desc Function to declare all the .view files
 * in the views subdir that end in .view
 */
function heartbeat_views_default_views() {
  $view = new view();
  $view->name = 'heartbeat_simple';
  $view->description = 'simple heartbeat views';
  $view->tag = 'heartbeat';
  $view->view_php = '';
  $view->base_table = 'heartbeat_activity';
  $view->is_cacheable = FALSE;
  $view->api_version = 2;
  $view->disabled = FALSE;

  /* Edit this to true to make a default view disabled initially */
  $handler = $view
    ->new_display('default', 'Defaults', 'default');
  $handler
    ->override_option('filters', array(
    'access_type' => array(
      'operator' => '=',
      'value' => array(
        'access' => '1',
        'whoisuser' => '0',
        'value' => '',
        'min' => '',
        'max' => '',
      ),
      'group' => '0',
      'exposed' => FALSE,
      'expose' => array(
        'operator' => FALSE,
        'label' => '',
      ),
      'id' => 'access_type',
      'table' => 'heartbeat_activity',
      'field' => 'access_type',
      'relationship' => 'none',
    ),
  ));
  $handler
    ->override_option('access', array(
    'type' => 'none',
  ));
  $handler
    ->override_option('cache', array(
    'type' => 'none',
  ));
  $handler
    ->override_option('row_plugin', 'heartbeat');
  $handler
    ->override_option('row_options', array(
    'messages' => 1,
  ));
  $handler = $view
    ->new_display('page', 'Page', 'public_heartbeat');
  $handler
    ->override_option('path', 'activity/public');
  $handler
    ->override_option('menu', array(
    'type' => 'normal',
    'title' => 'Site activity',
    'description' => 'Site activity logged by heartbeat',
    'weight' => '0',
    'name' => 'primary-links',
  ));
  $handler
    ->override_option('tab_options', array(
    'type' => 'none',
    'title' => '',
    'description' => '',
    'weight' => 0,
  ));
  $views[$view->name] = $view;
  return $views;
}

Functions