variable_views.module 837 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * @file
  4. * Variable views module.
  5. *
  6. * Provides variable values as views default arguments.
  7. *
  8. * @todo Full views integration for variable table.
  9. */
  10. /**
  11. * Implements hook_views_api().
  12. */
  13. function variable_views_views_api() {
  14. return array(
  15. 'api' => '3.0',
  16. //'path' => drupal_get_path('module', 'variable_views') . '/includes',
  17. );
  18. }
  19. /**
  20. * Implements hook_views_plugins()
  21. */
  22. function variable_views_views_plugins() {
  23. $plugins = array (
  24. 'argument default' => array(
  25. 'variable' => array(
  26. 'title' => t('Variable value'),
  27. 'handler' => 'views_plugin_argument_default_variable',
  28. ),
  29. ),
  30. );
  31. return $plugins;
  32. }
  33. /**
  34. * Variable list for the argument.
  35. */
  36. function _variable_views_variable_list() {
  37. return variable_list(variable_children(array_keys(variable_get_info())));
  38. }