You are here

function spaces_casetracker_context_define in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces_casetracker/spaces_casetracker.module \spaces_casetracker_context_define()

hook_context_define()

File

spaces_casetracker/spaces_casetracker.module, line 168

Code

function spaces_casetracker_context_define() {
  $items = array();
  $items[] = array(
    'namespace' => 'spaces',
    'attribute' => 'feature',
    'value' => 'casetracker',
    'node' => array(
      'casetracker_basic_case',
      'casetracker_basic_project',
    ),
    'views' => _spaces_casetracker_views(),
    'block' => array(
      array(
        'module' => 'views',
        'delta' => 'spaces_cases_myblock',
        'region' => 'right',
        'weight' => -11,
      ),
    ),
    'spaces' => array(
      'label' => t('Casetracker'),
      'description' => t('A casetracker for managing projects.'),
      'types' => array(
        'og',
      ),
      'menu' => array(
        'cases' => array(
          'title' => t('Casetracker'),
        ),
        'cases/my' => array(
          'title' => t('My cases'),
        ),
        'cases/mycreated' => array(
          'title' => t('Created by me'),
        ),
        'cases/projects' => array(
          'title' => t('Projects'),
        ),
        'cases/filter' => array(
          'title' => t('Cases filter'),
        ),
        'cases/by-status' => array(
          'title' => t('Cases by status'),
        ),
        'cases/by-project' => array(
          'title' => t('Cases by project'),
        ),
        'cases/by-user' => array(
          'title' => t('Cases by user'),
        ),
      ),
    ),
  );
  if (module_exists('spaces_user')) {
    $items[] = array(
      'namespace' => 'spaces',
      'attribute' => 'feature',
      'value' => 'user_cases',
      'node' => array(
        'casetracker_basic_case',
      ),
      'views' => array(
        'spaces_user_cases',
        'spaces_user_cases_created',
      ),
      'block' => array(),
      'spaces' => array(
        'label' => t('Cases'),
        'description' => t('Shows cases authored by and assigned to a user.'),
        'types' => array(
          'user',
        ),
        'menu' => array(
          'user-cases' => array(
            'title' => t('Cases'),
          ),
          'user-cases/created' => array(
            'title' => t('Created cases'),
          ),
        ),
      ),
    );
  }
  return $items;
}