views_handler_filter_node_tnid.inc

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

Definition of views_handler_filter_node_tnid.

Classes

Namesort descending Description
views_handler_filter_node_tnid Filter by whether the node is the original translation.

File

sites/all/modules/ulmus/views/modules/translation/views_handler_filter_node_tnid.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_filter_node_tnid.
  5. */
  6. /**
  7. * Filter by whether the node is the original translation.
  8. *
  9. * @ingroup views_filter_handlers
  10. */
  11. class views_handler_filter_node_tnid extends views_handler_filter {
  12. function admin_summary() { }
  13. function option_definition() {
  14. $options = parent::option_definition();
  15. $options['operator']['default'] = 1;
  16. return $options;
  17. }
  18. /**
  19. * Provide simple boolean operator
  20. */
  21. function operator_form(&$form, &$form_state) {
  22. $form['operator'] = array(
  23. '#type' => 'radios',
  24. '#title' => t('Include untranslated content'),
  25. '#default_value' => $this->operator,
  26. '#options' => array(
  27. 1 => t('Yes'),
  28. 0 => t('No'),
  29. ),
  30. );
  31. }
  32. function can_expose() { return FALSE; }
  33. function query() {
  34. $table = $this->ensure_my_table();
  35. // Select for source translations (tnid = nid). Conditionally, also accept either untranslated nodes (tnid = 0).
  36. $this->query->add_where_expression($this->options['group'], "$table.tnid = $table.nid" . ($this->operator ? " OR $table.tnid = 0" : ''));
  37. }
  38. }
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.