ds.views.inc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @file
  4. * Views hooks file.
  5. */
  6. /**
  7. * Implements hook_views_plugins().
  8. */
  9. function ds_views_plugins() {
  10. $path = drupal_get_path('module', 'ds');
  11. $views_plugins = array(
  12. 'module' => 'ds',
  13. 'row' => array(
  14. 'ds' => array(
  15. 'title' => t('Display Suite'),
  16. 'help' => t('Display the entity with the Display Suite module.'),
  17. 'handler' => 'views_plugin_ds_entity_view',
  18. 'path' => $path . '/views',
  19. 'base' => array('node', 'comment', 'users', 'apachesolr', 'taxonomy_term_data', 'file_managed', 'micro'),
  20. 'theme' => 'ds_row_entity',
  21. 'uses options' => TRUE,
  22. 'type' => 'normal',
  23. ),
  24. ),
  25. );
  26. if (module_exists('ds_extras') && variable_get('ds_extras_vd')) {
  27. $views_plugins['row']['ds_fields'] = array(
  28. 'uses fields' => TRUE,
  29. 'title' => t('Display Suite fields'),
  30. 'help' => t('Display fields through the Display Suite module.'),
  31. 'handler' => 'views_plugin_ds_fields_view',
  32. 'path' => $path . '/views',
  33. 'theme' => 'ds_row_fields',
  34. 'theme path' => $path . '/views',
  35. 'theme file' => 'views_plugin_ds_fields_view.inc',
  36. 'uses options' => TRUE,
  37. 'type' => 'normal',
  38. );
  39. }
  40. return $views_plugins;
  41. }