views_plugin_row_search_view.inc 834 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_plugin_row_search_view.
  5. */
  6. /**
  7. * Plugin which performs a node_view on the resulting object.
  8. */
  9. class views_plugin_row_search_view extends views_plugin_row {
  10. function option_definition() {
  11. $options = parent::option_definition();
  12. $options['score'] = array('default' => TRUE, 'bool' => TRUE);
  13. return $options;
  14. }
  15. function options_form(&$form, &$form_state) {
  16. $form['score'] = array(
  17. '#type' => 'checkbox',
  18. '#title' => t('Display score'),
  19. '#default_value' => $this->options['score'],
  20. );
  21. }
  22. /**
  23. * Override the behavior of the render() function.
  24. */
  25. function render($row) {
  26. return theme($this->theme_functions(),
  27. array(
  28. 'view' => $this->view,
  29. 'options' => $this->options,
  30. 'row' => $row
  31. ));
  32. }
  33. }