tweak.views.inc 715 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Provides support for Views integration.
  5. */
  6. /**
  7. * Implements hook_views_data_alter().
  8. *
  9. * Add Imagecache support to user picture
  10. */
  11. function tweak_views_data_alter(&$data) {
  12. $data['users']['picture']['field']['handler'] = 'tweak_handler_field_user_picture_preset';
  13. }
  14. /**
  15. * Implements hook_views_handlers().
  16. *
  17. * Declare the "user picture with imagecache preset" field handler
  18. */
  19. function tweak_views_handlers() {
  20. return array(
  21. 'info' => array(
  22. 'path' => drupal_get_path('module', 'tweak') .'/views',
  23. ),
  24. 'handlers' => array(
  25. 'tweak_handler_field_user_picture_preset' => array(
  26. 'parent' => 'views_handler_field_user_picture',
  27. ),
  28. ),
  29. );
  30. }