handler_argument_string.inc 646 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Contains SearchApiViewsHandlerArgumentString.
  5. */
  6. /**
  7. * Views argument handler class for handling string fields.
  8. */
  9. class SearchApiViewsHandlerArgumentString extends SearchApiViewsHandlerArgument {
  10. /**
  11. * Set up the query for this argument.
  12. *
  13. * The argument sent may be found at $this->argument.
  14. */
  15. public function query($group_by = FALSE) {
  16. if (empty($this->value)) {
  17. if (!empty($this->options['break_phrase'])) {
  18. views_break_phrase_string($this->argument, $this);
  19. }
  20. else {
  21. $this->value = array($this->argument);
  22. }
  23. }
  24. parent::query($group_by);
  25. }
  26. }