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