You are here

function spaces_core_context_define in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces_core/spaces_core.module \spaces_core_context_define()

Implementation of hook_context_define().

File

spaces_core/spaces_core.module, line 144

Code

function spaces_core_context_define() {
  $items = array();
  if (module_exists('blog')) {
    $items[] = array(
      'namespace' => 'spaces',
      'attribute' => 'feature',
      'value' => 'blog',
      'node' => array(
        'blog',
      ),
      'views' => array(
        'spaces_blog',
        'spaces_blog_comments',
      ),
      'block' => array(
        array(
          'module' => 'views',
          'delta' => 'spaces_blog_comments',
          'region' => 'right',
          'weight' => -11,
        ),
      ),
      'spaces' => array(
        'label' => t('Blog'),
        'description' => t('A member blog and team discussion space.'),
        'menu' => array(
          'blog' => array(
            'title' => t('Blog'),
            'weight' => -5,
          ),
        ),
      ),
    );
  }
  if (module_exists('book')) {
    $items[] = array(
      'namespace' => 'spaces',
      'attribute' => 'feature',
      'value' => 'book',
      'node' => array(
        'book',
      ),
      'block' => array(
        array(
          'module' => 'spaces_core',
          'delta' => 'book',
          'region' => 'right',
          'weight' => -11,
        ),
      ),
      'spaces' => array(
        'label' => t('Documents'),
        'description' => t('A document section for maintaining a knowledge base.'),
        'menu' => array(
          'documents' => array(
            'title' => t('Documents'),
          ),
        ),
        'types' => array(
          'og',
        ),
      ),
    );
  }
  if (module_exists('taxonomy')) {
    $items[] = array(
      'namespace' => 'spaces',
      'attribute' => 'feature',
      'value' => 'taxonomy',
      'views' => array(
        'spaces_taxonomy',
      ),
      'block' => array(
        array(
          'module' => 'spaces_core',
          'delta' => 'tags',
          'region' => 'right',
          'weight' => -11,
        ),
      ),
    );
  }
  return $items;
}