views_handler_argument_term_node_tid_depth_modifier.inc

  1. cis7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  2. cle7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  3. ecd7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  4. elmsmedia7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  5. harmony7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  6. icor7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  7. meedjum_blog7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
  8. mooc7 sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc

Definition of views_handler_argument_term_node_tid_depth_modif.

Classes

Namesort descending Description
views_handler_argument_term_node_tid_depth_modifier Argument handler for to modify depth for a previous term.

File

sites/all/modules/ulmus/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_argument_term_node_tid_depth_modif.
  5. */
  6. /**
  7. * Argument handler for to modify depth for a previous term.
  8. *
  9. * This handler is actually part of the node table and has some restrictions,
  10. * because it uses a subquery to find nodes with.
  11. *
  12. * @ingroup views_argument_handlers
  13. */
  14. class views_handler_argument_term_node_tid_depth_modifier extends views_handler_argument {
  15. function options_form(&$form, &$form_state) { }
  16. function query($group_by = FALSE) { }
  17. function pre_query() {
  18. // We don't know our argument yet, but it's based upon our position:
  19. $argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL;
  20. if (!is_numeric($argument)) {
  21. return;
  22. }
  23. if ($argument > 10) {
  24. $argument = 10;
  25. }
  26. if ($argument < -10) {
  27. $argument = -10;
  28. }
  29. // figure out which argument preceded us.
  30. $keys = array_reverse(array_keys($this->view->argument));
  31. $skip = TRUE;
  32. foreach ($keys as $key) {
  33. if ($key == $this->options['id']) {
  34. $skip = FALSE;
  35. continue;
  36. }
  37. if ($skip) {
  38. continue;
  39. }
  40. if (empty($this->view->argument[$key])) {
  41. continue;
  42. }
  43. if (isset($handler)) {
  44. unset($handler);
  45. }
  46. $handler = &$this->view->argument[$key];
  47. if (empty($handler->definition['accept depth modifier'])) {
  48. continue;
  49. }
  50. // Finally!
  51. $handler->options['depth'] = $argument;
  52. }
  53. }
  54. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.