You are here

function _spaces_dashboard_views_group_directory in Spaces 5

Same name and namespace in other branches
  1. 5.2 spaces_dashboard/spaces_dashboard.module \_spaces_dashboard_views_group_directory()
1 string reference to '_spaces_dashboard_views_group_directory'
spaces_dashboard_views_default_views in spaces_dashboard/spaces_dashboard.module
Implementation of hook_default_views

File

spaces_dashboard/spaces_dashboard.module, line 537

Code

function _spaces_dashboard_views_group_directory() {
  $view = new stdClass();
  $view->name = 'spaces_group_directory';
  $view->description = '';
  $view->access = array();
  $view->view_args_php = '';
  $view->menu = TRUE;
  $view->menu_title = t('Directory');
  $view->page = TRUE;
  $view->page_title = t('Group Directory');
  $view->page_type = 'table';
  $view->url = 'group_dashboard/group_directory';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '25';
  $view->sort = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array();
  $view->field = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'label' => 'Group',
      'handler' => '_spaces_dashboard_views_handler_field_nodelink',
      'options' => 'link',
    ),
    array(
      'tablename' => 'og',
      'field' => 'private',
      'handler' => '_spaces_dashboard_views_handler_field_private',
      'label' => 'Privacy',
    ),
    array(
      'tablename' => 'og',
      'field' => 'count',
      'label' => 'Members',
    ),
  );
  $view->filter = array(
    array(
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array(
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => og_get_types('group'),
    ),
  );
  $view->exposed_filter = array();
  $view->requires = array(
    node,
    og,
  );
  return $view;
}