Passed
Push — Firesphere-funding-yml ( ab824b...2bf34e )
by Simon
18:25 queued 11:53
created

SearchForm::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Forms;
5
6
use SilverStripe\Control\RequestHandler;
7
use SilverStripe\Forms\FieldList;
8
use SilverStripe\Forms\Form;
9
use SilverStripe\Forms\Validator;
10
11
/**
12
 * Class SolrSearchForm
13
 * Basic form to start searching
14
 * @package Firesphere\SolrSearch\Forms
15
 */
16
class SearchForm extends Form
17
{
18
    /**
19
     * SolrSearchForm constructor.
20
     * @param RequestHandler|null $controller
21
     * @param string $name
22
     * @param FieldList|null $fields
23
     * @param FieldList|null $actions
24
     * @param Validator|null $validator
25
     */
26
    public function __construct(
27
        RequestHandler $controller = null,
28
        $name = self::DEFAULT_NAME,
29
        FieldList $fields = null,
30
        FieldList $actions = null,
31
        Validator $validator = null
32
    ) {
33
        parent::__construct($controller, $name, $fields, $actions, $validator);
34
35
        $this->setFormMethod('GET');
36
37
        $this->disableSecurityToken();
38
    }
39
}
40