You are here

function _spaces_casetracker_views_cases_mycreated in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces_casetracker/spaces_casetracker.module \_spaces_casetracker_views_cases_mycreated()
1 string reference to '_spaces_casetracker_views_cases_mycreated'
spaces_casetracker_views_default_views in spaces_casetracker/spaces_casetracker.module
Implementation of hook_default_views

File

spaces_casetracker/spaces_casetracker.module, line 908

Code

function _spaces_casetracker_views_cases_mycreated() {
  $view = _spaces_casetracker_views_base();
  $view->name = 'spaces_cases_mycreated';
  $view->description = t('A view of all cases made by the current user.');
  $view->menu = TRUE;
  $view->menu_title = t('Created by me');
  $view->page = TRUE;
  $view->page_title = t('Created by me');
  $view->url = 'cases/mycreated';
  $view->sort = array(
    array(
      'tablename' => 'casetracker_case',
      'field' => 'case_status_id',
      'sortorder' => 'ASC',
      'options' => 'normal',
    ),
  );
  $view->filter['user'] = array(
    'tablename' => 'node',
    'field' => 'currentuid',
    'operator' => '=',
    'options' => '',
    'value' => '***CURRENT_USER***',
  );
  $view->filter['project'] = array(
    'tablename' => 'casetracker_project',
    'field' => 'project_number',
    'operator' => 'OR',
    'options' => '',
    'value' => array(
      0 => '100',
    ),
  );
  $view->exposed_filter = array(
    array(
      'tablename' => 'casetracker_project',
      'field' => 'project_number',
      'label' => 'Project',
      'optional' => '1',
      'is_default' => '0',
      'operator' => '1',
      'single' => '1',
    ),
  );
  return $view;
}