1.20.x views_ui.module views_ui_views_ui_wizards()

Implements hook_views_ui_wizards().

File

modules/views_ui/views_ui.module, line 580
Provide structure for the administrative interface to Views.

Code

function views_ui_views_ui_wizards() {
  if (module_exists('comment')) {
    $plugins['comment'] = array(
      'name' => 'comment',
      'base_table' => 'comment',
      'created_column' => 'created',
      'form_wizard_class' => array(
        'file' => 'views_ui_comment_views_wizard.php',
        'class' => 'ViewsUiCommentViewsWizard',
      ),
      'title' => t('Comments'),
      'filters' => array(
        'status' => array(
          'value' => COMMENT_PUBLISHED,
          'table' => 'comment',
          'field' => 'status',
        ),
        'status_node' => array(
          'value' => NODE_PUBLISHED,
          'table' => 'node',
          'field' => 'status',
          'relationship' => 'nid',
        ),
      ),
      'path_field' => array(
        'id' => 'cid',
        'table' => 'comment',
        'field' => 'cid',
        'exclude' => TRUE,
        'link_to_comment' => FALSE,
        'alter' => array(
          'alter_text' => 1,
          'text' => 'comment/[cid]#comment-[cid]',
        ),
      ),
    );
  }
  $plugins['file_managed'] = array(
    'name' => 'file_managed',
    'base_table' => 'file_managed',
    'created_column' => 'timestamp',
    'form_wizard_class' => array(
      'file' => 'views_ui_file_managed_views_wizard.php',
      'class' => 'ViewsUiFileManagedViewsWizard',
    ),
    'title' => t('Files'),
    'filters' => array(
    ),
    'path_field' => array(
      'id' => 'uri',
      'table' => 'file_managed',
      'field' => 'uri',
      'exclude' => TRUE,
      'file_download_path' => TRUE,
    ),
  );
  $plugins['node'] = array(
    'name' => 'node',
    'base_table' => 'node',
    'created_column' => 'created',
    'available_sorts' => array(
      'title:DESC' => t('Title')
    ),
    'form_wizard_class' => array(
      'file' => 'views_ui_node_views_wizard.php',
      'class' => 'ViewsUiNodeViewsWizard',
    ),
    'title' => t('Content'),
    'filters' => array(
      'status' => array(
        'value' => NODE_PUBLISHED,
        'table' => 'node',
        'field' => 'status',
      ),
    ),
    'path_field' => array(
      'id' => 'nid',
      'table' => 'node',
      'field' => 'nid',
      'exclude' => TRUE,
      'link_to_node' => FALSE,
      'alter' => array(
        'alter_text' => 1,
        'text' => 'node/[nid]',
      ),
    ),
  );
  $plugins['node_revision'] = array(
    'name' => 'node_revision',
    'base_table' => 'node_revision',
    'created_column' => 'timestamp',
    'form_wizard_class' => array(
      'file' => 'views_ui_node_revision_views_wizard.php',
      'class' => 'ViewsUiNodeRevisionViewsWizard',
    ),
    'title' => t('Content revisions'),
    'filters' => array(
      'status' => array(
        'value' => '1',
        'table' => 'node', // @todo - unclear if this should be node or node_revision
        'field' => 'status',
      ),
    ),
    'path_field' => array(
      'id' => 'vid',
      'table' => 'node_revision',
      'field' => 'vid',
      'exclude' => TRUE,
      'alter' => array(
        'alter_text' => 1,
        'text' => 'node/[nid]/revisions/[vid]/view',
      ),
    ),
    'path_fields_supplemental' => array(
      array(
        'id' => 'nid',
        'table' => 'node',
        'field' => 'nid',
        'exclude' => TRUE,
        'link_to_node' => FALSE,
      ),
    ),
  );
  if (module_exists('taxonomy')) {
    $plugins['taxonomy_term'] = array(
      'name' => 'taxonomy_term',
      'base_table' => 'taxonomy_term_data',
      'form_wizard_class' => array(
        'file' => 'views_ui_taxonomy_term_views_wizard.php',
        'class' => 'ViewsUiTaxonomyTermViewsWizard',
      ),
      'title' => t('Taxonomy terms'),
      'filters' => array(
      ),
      'path_field' => array(
        'id' => 'tid',
        'table' => 'taxonomy_term_data',
        'field' => 'tid',
        'exclude' => TRUE,
        'alter' => array(
          'alter_text' => 1,
          'text' => 'taxonomy/term/[tid]',
        ),
      ),
    );
  }
  $plugins['users'] = array(
    'name' => 'users',
    'base_table' => 'users',
    'created_column' => 'created',
    'form_wizard_class' => array(
      'file' => 'views_ui_users_views_wizard.php',
      'class' => 'ViewsUiUsersViewsWizard',
    ),
    'title' => t('User accounts'),
    'filters' => array(
      'status' => array(
        'value' => '1',
        'table' => 'users',
        'field' => 'status',
      ),
    ),
    'path_field' => array(
      'id' => 'uid',
      'table' => 'users',
      'field' => 'uid',
      'exclude' => TRUE,
      'link_to_user' => FALSE,
      'alter' => array(
        'alter_text' => 1,
        'text' => 'user/[uid]',
      ),
    ),
  );
  return $plugins;
}