views_handler_filter_profile_selection.inc

  1. 3.x modules/profile/views_handler_filter_profile_selection.inc
  2. 2.x modules/profile/views_handler_filter_profile_selection.inc

File

modules/profile/views_handler_filter_profile_selection.inc
View source
  1. <?php
  2. /**
  3. * Filter by a selection widget in the profile.
  4. */
  5. class views_handler_filter_profile_selection extends views_handler_filter_in_operator {
  6. function get_value_options() {
  7. if (isset($this->value_options)) {
  8. return;
  9. }
  10. $this->value_options = array();
  11. $all_options = profile_views_get_fields();
  12. $field = $all_options[$this->definition['fid']];
  13. $lines = split("[,\n\r]", $field->options);
  14. foreach ($lines as $line) {
  15. if ($line = trim($line)) {
  16. $this->value_options[$line] = $line;
  17. }
  18. }
  19. }
  20. }